• 8

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

Anyone facing the problem on the latest realm (2.25.0) with react native (0.59.0)?

There's no problem with when I link the realm to react-native. However, when I ran the 'react-native run-android' on a real device (currently I'm testing on two devices, Oneplus 5 - Android Pie & Oppo F1s - Android Lollipop), the bundling successful, but the apps never get started. I unlinked the realm from react-native, it returns me 'Missing Realm Constructor...' (which is in my expectation).

It does works on emulator without any problem, it only runs into a problem on real devices.

Below is my package.json

 "name": "testing",
 "version": "0.0.1",
 "private": true,
 "scripts": {
   "start": "node node_modules/react-native/local-cli/cli.js start",
   "test": "jest"
 "dependencies": {
   "react": "16.8.3",
   "react-native": "0.59.0",
   "realm": "^2.25.0"
 "devDependencies": {
   "@babel/core": "^7.3.4",
   "@babel/runtime": "^7.3.4",
   "babel-jest": "^24.5.0",
   "jest": "^24.5.0",
   "metro-react-native-babel-preset": "^0.53.0",
   "react-test-renderer": "16.8.3"
 "jest": {
   "preset": "react-native"

Steps to reproduce:

  1. react-native init testing
  2. npm install --save realm
  3. react-native link realm
  4. react-native run-android

Does anyone have an idea on this issue? Appreciate for your help.

try this: go to build.gradle then

android {
   defaultConfig {

and add this

ndk {
        abiFilters 'armeabi-v7a', 'x86'

to default config. it must look like this :

defaultConfig {
         ndk {
        abiFilters 'armeabi-v7a', 'x86'
  • 1
Reply Report
      • 2
    • to be honest had same problem once and i found the answer in stack-overflow, and i just wanted to give a reference to that link, but i could not find the question. so i decided to write it myself for you. i really don't know what is doing this code. but i know this is an open issue on GitHub and react-native community already reported issue. probably this will be fixed in newer version but for now just use this.
      • 2
    • great! it's working now! but can I know what is this doing? I found this config in my previous project with an older version of react-native and realm.