-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fresh Install Android Broken on React Native 0.60 RC2 #25415
Comments
I looks like you use native module that depends support-library, instead of AndroidX, and causing conflicts. Please make sure that third-party modules you use are AndroidX compatible or check out https://github.com/mikehardy/jetifier. |
@dulmandakh Which third party module exactly? I am trying to run a clean, fresh, newly created project created with |
I’m facing similar issue on an app porting from 0.59.9 to 0.60.0. I’ve already run |
Why this issue closed??? i'm facing the same problem |
This is also happening with React Native v0.60.0 (the full release, not an RC) |
When I use react-native run-android command Metro server start. But after few seconds later its getting closed. Do we need to run it by other command or its a bug in react native 0.60.0 version |
@dulmandakh Please reconsider reopening this issue, as I've said I'm not using any third party modules, and many other people here are having the same problem with me. |
Same issue during the react native integration with an existing app
|
I'm also facing the same issue.
Also, I'm not using any third partly library or anything. Getting this error on fresh Android Application. |
Yep, after doing some fixes from google get this one too |
Same issue here |
Same issue |
Found a fix, this works for me (based off of the suggestion over at #25537): Do an npm install --save jsc-android Then make sure to add this jsc-android block to your allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
//THIS ONE
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
jcenter()
}
} If you already have this block in your Note: This fixes the crash caused by |
the previous fix doesn't work for me, I still have the same |
#25537 (comment) i found fix that helped me |
these changes makes things working for me. |
with this #25415 (comment) at least now I can see the react-native component I've just needed to add this line to my app build.gradle but the error with the bridge is still there
|
I upgaded react-native from 0.56.0 to 0.60.0 using https://github.com/react-native-community/rn-diff-purge/compare/release/0.56.0..release/0.60.0#diff-1bcdc04ee1388d1458277d59136926e8. I did all changes as mentioned in the above link. But am getting error : BUILD FAILED in 44s error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details. FAILURE: Build failed with an exception.
|
Anybody help me to resolve this issue. |
@Pravsreddy Offtopic, no one will help you here. Create new bug if you think it is |
You probably had this in your
Or something similar that specifies your version to 28.0.0 Then if you followed the migration table from https://developer.android.com/jetpack/androidx/migrate you probably saw that and thought that
Hope this helps someone who stumbles across this :) |
2019-08-20 00:38:26.816 27139-27139/? E/SoLoader: couldn't find DSO to load: libjscexecutor.so Have anyone found solution? |
if you have this error it means that you have a jsc aar missing, you can find it in node_modules\jsc-android\dist Make sure it is included in your dependencies |
I'm also facing same issue. |
Have same error:
Details:
|
Is there are any workaround for this issue? |
Did anyone try to use targetSdkVersion and compileSdkVersion 28 ? With build-tools 28.0.3 ? I think react native has a problem with sdkVersion 29 because when I couldn't run with it sdkVersion 29 and I had to revert to sdkVersion 28. May be I did a bad config but you guys should try that out. |
Here's a work around that fixes the issue: Do npm i jsc-android
put the below lines of code in allProjects/repositories in android build.gradle file
put the below lines of code in app build.gradle
in gradle.properties
|
@saadmutahar hi, can you help me to check my build.gradle file? I still facing the same issue def useIntlJsc = true // top of the file import com.android.build.OutputFile project.ext.react = [ apply from: "../../node_modules/react-native/react.gradle" def enableSeparateBuildPerCPUArchitecture = false def enableProguardInReleaseBuilds = false def jscFlavor = 'org.webkit:android-jsc:+' def enableHermes = project.ext.react.get("enableHermes", false); android {
} dependencies { // Run this once to be able to run the application with BUCK apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) |
@nolife08021 It looks like you're going good with app build file, did you follow every steps as I mentioned above. If so please share your package.json file and project build file also. |
@saadmutahar here's my package.json file and project build file. Thanks package.json { root/build.gradle `// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { allprojects { |
@nolife08021 please don't forgot to write "postinstall": "npx jetify" in your package.json file.
|
@saadmutahar Thanks!!!!! I am able to launch the app now. Can you please explain to me that what this code means?? |
Great to hear that you are able to run the app. This is because some of your React Native modules with native Java code that isn't converted to AndroidX, and your app is AndroidX, you probably need this. |
This worked for me without |
Any updates? |
|
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
As React Native will default to AndroidX from 0.60, I want to upgrade my project to 0.60RC2 and AndroidX but I can't get it to working. I can reproduce it with a fresh project.
React Native version:
Steps To Reproduce
react-native init testproject
(it creates a project using"react-native": "0.59.9"
dependency).cd /Users/Can/Desktop/testproject && react-native run-android
(replace path with yours).local.properties
intoandroid
folder with the contentsdk.dir=/Users/Can/Library/Android/sdk
(replace it with your Android SDK path)react-native run-android
again. It runs perfectly. It displays the default Hello World app screen on my emulator.package.json
and switch RN version to 0.60 RC2:"react-native": "0.60.0-rc.2"
npm install
to update to latest version.react-native run-android
again. It errorsTask :app:processDebugManifest FAILED
:What I've tried:
tools:replace="android:appComponentFactory"
toapplication
tag in my project's rootAndroidManifest.xml
and tried running again. Then I got a different error:After a quick Googling I've found this comment where it suggests to add
xmlns:tools="http://schemas.android.com/tools"
to the manifest's root tag, so I did it. When I ran, this time I got:After Googling that too I've stumbled upon a StackOverflow question regarding the same issue with this answer: It tells, if migrating to AndroidX (which RN 0.60 uses by default), to remove those tags from manifest and add the following lines to
gradle.properties
:So I did those. Now, the build succeeds on RN 0.60, but immedieately at launch I'm getting the following error in LogCat and the app crashes on launch:
I've then Googled
dlopen failed: library "libjsc.so" not found
and stumbled upon someone having the same issue after upgrading to 0.60 RC2. I've tried the accepted answer and addeddef useIntlJsc = false
to the top ofapp/build.gradle
and the following snippet into dependencies:At this point nothing changed and I keep getting the same error. In addition to the steps above, (I know the following is unreproducible but may hint to a clue) when I tried the same steps in my actual project, this last answer worked, but then I got an error saying
libgnustl_shared.so
instead oflibjsc.so
.Describe what you expected to happen:
I expected a fresh package to run normally with 0.60.
How can I get React Native 0.60 working with Android?
The text was updated successfully, but these errors were encountered: