Realm-js: Can't find variable: Symbol

Created on 22 Nov 2016  路  14Comments  路  Source: realm/realm-js

Hi,

I am getting Can't find variable: Symbol constants.js 30 error in Android 4.2.2
Please help me

T-Bug

Most helpful comment

MainApplication.java added +

+import io.realm.react.RealmReactPackage;

@Override
protected List getPackages() {
return Arrays.asList(
+ new RealmReactPackage(),
new MainReactPackage()
);
}

All 14 comments

me too in Android 6.0,react native 0.37.0,realm 0.15.0

the wrong position: realm/lib/browser/index.js,line 22, ----> realm/lib/browser/constants.js,line 29 and 30,

].forEach(function(name) {
keys[name] = Symbol();

Having the same bug

am also having the same issue. plz can any one help...!
Thanks in advance.

any solution, i can't use realm on android. i'm thinking on using some other library.

MainApplication.java added +

+import io.realm.react.RealmReactPackage;

@Override
protected List getPackages() {
return Arrays.asList(
+ new RealmReactPackage(),
new MainReactPackage()
);
}

I can confirm for react-native 0.39 and realm 0.15.0 the solution by @igoryarovoy works for me as well. I am not sure if this is an issue from the realm project or more from the rnpm tool.

Hi @snsekar I think it's a problem with rnpm it's updating the settings.gradle but not the MainApplication, hence the work around from @igoryarovoy

anyway we should start using react-native link since rnpm link is now supported inside React Native tooling.

@igoryarovoy answer works for me, using RN 0.37 and Realm 0.15

@igoryarovoy @nhachicha Thanks for fixing the issue.

@igoryarovoy Thanks

Fixed for me too. Can we get this in the official documentation somewhere? I spent a few hours scratching my head on this issue.

I'm sorry this issue is such a pain. The new release hopefully helps slightly and I will update the documentation until we can get rid of it completely.

I have a new problem with this. I'm using react-native-navigation (a pretty popular package) and it requires you to extend NavigationApplication in your MainApplication.java. This means that the solution here doesn't work since getPackages() doesn't override anything anymore. Any ideas?

Was this page helpful?
0 / 5 - 0 ratings