realm / realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores
https://realm.io
Apache License 2.0
5.79k stars 576 forks source link

Reference to loadLibrary is ambiguous SoLoader.loadLibrary("realmreact") #2346

Closed SantosDavid closed 5 years ago

SantosDavid commented 5 years ago

Goals

Create an app with expo and after removing expo I will try to use Realm and React native.

Expected Results

Run app an Emulator e build apk.

Actual Results

image

Steps to Reproduce

1 - Run: expo init new-project

2 - Run: Expo eject

3 - Follow this tutorial

4 - Run: npm install --save realm

5 - Run: react-native link realm

6 - Run: expo start and react-native run-android --variant devKernelDebug.

Version of Realm and Tooling

kneth commented 5 years ago

@SantosDavid Expo doesn't support Realm: https://expo.canny.io/feature-requests/p/support-for-realm

Said that, it looks like SoLoader is included twice?

SantosDavid commented 5 years ago

@kneth I removed expo from my project.

I ran expo eject and chose to keep expo kit. Does Realm work with expoKit ?

I think the SoLoader.loadLibrary can't be resolved.

SantosDavid commented 5 years ago

The app was running in the emulator with Realm for about 2 weeks.

I don't know what happened, but now doesn't work anymore.

I try make a new app with the same "Steps to Reproduce" in different computers, but too doesn't work.

kneth commented 5 years ago

@SantosDavid I think you are running into the same issue as described in https://github.com/expo/expo/issues/1743

mayaflor commented 5 years ago

Hi @kneth, thanks for helping us!

I'm working on this project along with @SantosDavid and we figured out what was wrong. The build.gradle file on the android/app folder was generated using the deprecated term compile instead of implementation

So Realm really does work with ExpoKit.

kneth commented 5 years ago

@SantosDavid @mayaflor Thanks for the update. It is great to hear that you have succes with the ExpoKit/Realm combo.