React Native 0.63.3 app doesn't install on Android 4.1
See original GitHub issueDescription
I created an app with npx react-native init Test41 --version 0.63.3
. I’m using Oracle Java version 15.0.1, and I had to set gradle to 6.5 in my gradle.properties
and use version 4.1.0 of the gradle plugin as the app failed to build otherwise. I didn’t change anything else. I have
minSdkVersion = 16
compileSdkVersion = 29
targetSdkVersion = 29
in my android/build.gradle
. It runs fine on Android 9, but doesn’t install on a client’s device, which is Samsung Galaxy S II, running Android 4.1. My client copies the apk on his phone, launches the installer, allows to use internet (the basic RN android.permission.INTERNET) and then he is presented with a screen, just saying the app isn’t installed.
React Native version:
I have both Android Studio and Android SDK installed. I carefully followed the setup guide and I can’t understand why they aren’t found.
System: OS: Linux 5.8 Ubuntu 20.10 (Groovy Gorilla) CPU: (4) x64 Intel® Core™ i5-6200U CPU @ 2.30GHz Memory: 1006.61 MB / 5.70 GB Shell: 5.0.17 - /bin/bash Binaries: Node: 14.15.0 - ~/.nvm/versions/node/v14.15.0/bin/node Yarn: Not Found npm: 6.14.8 - ~/.nvm/versions/node/v14.15.0/bin/npm Watchman: Not Found SDKs: Android SDK: Not Found IDEs: Android Studio: Not Found Languages: Java: 15.0.1 - /usr/lib/jvm/jdk-15.0.1/bin/javac Python: 3.8.6 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.3 => 0.63.3 npmGlobalPackages: react-native: Not Found
Steps To Reproduce
Just create a new app with npx react-native init Test41 --version 0.63.3
, build release and try to install on Android 4.1
Expected Results
The app is installed on Android 4.1.
Snack, code example, screenshot, or link to a repository:
Issue Analytics
- State:
- Created 3 years ago
- Comments:10
I am able to build successfully, and the apk is signed. The problem though is that the app is not bundled correctly - or more precisely - the android.bundle.js file is generated, but it still isn’t picked up. I therefore get the error telling me to start the metro server or bundle my app correctly. I believe there is some incompatibility between the RN gradle script and the new version, but I haven’t delved too deeply into it.
For me the app immediately crashes when i use the android gradle plugin 4.1.1 + gradle 6.5 or 6.7. The error it gives me is that my app is not bundled for release and requires the metro server - this is in a production build. It seems whatever gradle settings I use do not change this at all. I had to revert back to using the android gradle plugin 3.5.3 for this to work.