I recently detached my application from the expo environment so I could run react-native link. I can successfully build and deploy the application to an iOS device via xCode. When I build for the Android environment in Android studio gradle reports a successful build and opens the device in a pixel simulator. The simulator will fetch my javascript bundle from XDE and attempt to launch. This is when the ‘DeviceInfo module is not installed correctly’ error appears right before the app crashes. I have installed the react-native-device-info module and ran react-native link but the same error happens. I even double checked to make sure RNDeviceInfo was in the MainApplication.java files. No dice though. Any help would be greatly appreciated.
Unfortunately no. It’s hosted a corporate github environment. I can post screen shots of the code if needed though. What would be helpful? I don’t have much experience with android projects so any direction would be great
edit: Did not see the second post from you. I figured you were using that as well but installed the device info module just to be safe.
Hmm okay. Maybe you could try and detach from a fresh project and see if it works there? It’s really hard to say what’s going wrong without a way to reproduce it.
Update: Detaching from a fresh project does not throw the error. I detached the Expo tab project and it is working correctly.
Comparing the MainActivities and the build.gradle shows that my project is wanting to use expo sdk 16.0.0 but I upgraded to 17.0.0 when getting the project to build in xCode. I had to go in and configure xCode and change some of the plist files in order to do so. I did not see any similar instructions for the android side in the Expo docs. Is there a different process for the Android side? These are the lines in question :
MainActivity
public List sdkVersions() {
return new ArrayList<>(Arrays.asList(“16.0.0”));
}
Trying to change the build.gradle throws an error saying host.exp.exponent:expoview:17.0.0@aar does not exit. I can change the MainActivity file though. Do you think that would have something to do with it?