question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React Native 0.63.3 app doesn't install on Android 4.1

See original GitHub issue

Description

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:

repo

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

3reactions
Goldzihercommented, Nov 20, 2020

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.

2reactions
Goldzihercommented, Nov 20, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native Android app 0.63.3 crashing in release after ...
After, a a bit of digging, it appears that react native 0.63.3 is not compatible with android gradle plugin 4.1+/ gradle 6.5+.
Read more >
Prerequisites for Applications - React Native
Using the New Architecture on Android has some prerequisites that you need to meet: Using Gradle 7.x and Android Gradle Plugin 7.x; Using...
Read more >
react-native-safe-area-context - npm
npm install react-native-safe-area-context. You then need to link the native parts of the library for the platforms you are using. iOS ...
Read more >
3 Things to Know About Android as React Native Developer
The first one is the main build file for the whole project. It is used mostly for things that are common for all...
Read more >
Installing Iterable's React Native SDK
Step 1: Install the SDK package · Step 2: Install other dependencies · Step 3: iOS app setup · Step 4: Android app...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found