Closed joshuakoh7 closed 3 years ago
The exact same thing happened to me. My best guess is that there some update to the android sdks
The last error you got seems to be due to the new AndroidX support libraries
I found som info here: https://github.com/kmagiera/react-native-gesture-handler/pull/589 https://github.com/react-native-community/react-native-viewpager/pull/22
I have the same issue, i try to downgrade and update react-native-gesture-handle but doesn't works form me.
RN 0.59 react-native-gesture-handle 1.2.1
Having the same issue, build specs:
React Native Environment Info:
System:
OS: macOS 10.14.5
CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
Memory: 26.11 MB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.10.0 - ~/.nodenv/versions/10.10.0/bin/node
Yarn: 1.16.0 - ~/.nodenv/versions/10.10.0/bin/yarn
npm: 6.9.0 - ~/.nodenv/versions/10.10.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.0
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.9 => 0.59.9
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
------------------------------------------------------------
Gradle 5.4.1
------------------------------------------------------------
Build time: 2019-04-26 08:14:42 UTC
Revision: 261d171646b36a6a28d5a19a69676cd098a4c19d
Kotlin: 1.3.21
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM: 1.8.0_152 (Oracle Corporation 25.152-b16)
OS: Mac OS X 10.14.5 x86_64
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 24
compileSdkVersion = 28
targetSdkVersion = 26
supportLibVersion = "28.0.0"
}
gradle.properties
googlePlayServicesVersion = "16.1.0"
firebaseVersion = "17.6.0"
dependencies
dependencies {
implementation project(':@react-native-community_async-storage')
implementation (project(':react-native-push-notification'), {
exclude group: "com.google.android.gms"
exclude group: "com.google.firebase"
})
implementation project(':react-native-config')
implementation project(':react-native-sensitive-info')
implementation project(':react-native-webview')
implementation (project(":react-native-device-info"), {
exclude group: "com.google.android.gms"
})
implementation project(':react-native-gesture-handler')
implementation project(':react-native-vector-icons')
implementation "com.google.android.gms:play-services-gcm:16.1.0"
implementation "com.google.firebase:firebase-messaging:17.6.0"
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
}
For me works, i excludes android.useAndroidX=true android.enableJetifier=true from gadle.properties
So had to update two libs react-native-gesture-handle@1.3.0 and react-native-device-info@2.1.2
Just it
For me this seems to work now: https://github.com/react-native-aar/react-native-gesture-handler
Actually these needed to be set false in your gradle.properties file:
android.useAndroidX=false
android.enableJetifier=false
Changed all settings but forgot about these 2 important flags 😄 . Will only be supported from RN 0.60.+. Building package using Android Studio didn't work, just use:
cd android
./gradlew bundleRelease
For me works, i excludes android.useAndroidX=true android.enableJetifier=true from gadle.properties
So had to update two libs react-native-gesture-handle@1.3.0 and react-native-device-info@2.1.2
Just it
Upgrading these two made it work thanks
android.useAndroidX=false android.enableJetifier=false
when i try to run-android it works but cd android ./gradlew bundleRelease still says =>
FAILURE: Build failed with an exception.
java.nio.file.NoSuchFileException: /Users/srhtylmz/Desktop/otonomiApp/node_modules/react-native-gesture-handler/android/build/intermediates/merged_man?fests/release/../../l?brary_man?fest/release/AndroidManifest.xml
Task :react-native-gesture-handler:compileDebugJavaWithJavac FAILED
It causes this error for the RN 0.60
.
You can solve this by following,
npm i jetifier
npx jetify
fixed it for me on RN 0.60
.
Have a good day.
@Harsh2402 found the best and simpliest fix. I really didn't understand why but it worked.
Can any one of the contributors help us to understand why?
@zscaiosi You can refer the following link, https://facebook.github.io/react-native/blog/2019/07/03/version-60
For the AndroidX migration, we need to fix that with jetifier
.
adding 2 lines to gradle.properties under android android.useAndroidX=true android.enableJetifier=true
run following command
npm install -g jetifier npx jetify
sunilpatidar's answer worked for me
adding 2 lines to gradle.properties under android
android.useAndroidX=true
android.enableJetifier=true
run following command
npm install -g jetifier
npx jetify
adding 2 lines to gradle.properties under android android.useAndroidX=true android.enableJetifier=true
run following command
npm install -g jetifier npx jetify
Working for me. I need clean the project after exec this commands but works!
react-native link
solved the issue
Nothing is work for me as i tried all of these react-native .60
Task :react-native-gesture-handler:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
Nothing is work for me as i tried all of these react-native .60
Task :react-native-gesture-handler:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
Did you try this? For me works, i excludes android.useAndroidX=true android.enableJetifier=true from gadle.properties
So had to update two libs react-native-gesture-handle@1.3.0 and react-native-device-info@2.1.2
Just it
adding 2 lines to gradle.properties under android android.useAndroidX=true android.enableJetifier=true
run following command
npm install -g jetifier npx jetify
He saved my day :))
Where is gadle.properties?
Where is gadle.properties?
android/gradle.properties
Where is gadle.properties?
android/gradle.properties
Thx Sir
sunilpatidhar thank you so much
It causes this error for the
RN 0.60
. You can solve this by following,npm i jetifier npx jetify
fixed it for me on
RN 0.60
.Have a good day.
This worked but folks...this makes zero sense how can we close our development machines start them back up and everything breaks? I had the same issue as the OP and thankfully @Harsh2402 worked for me.
This has ruined my confidence in Android Studio on Windows 10 I cannot justify the downtime in productivity.
sunilpatidar's answer worked for me adding 2 lines to gradle.properties under android android.useAndroidX=true android.enableJetifier=true run following command npm install -g jetifier npx jetify
very good! It worked
This issue was not active for some time so I'm closing it. If you need further help please reply.
Initially encountered this error out of nowhere. By nowhere I mean it was working fine before I went to bed and it broke when I woke with no changes made on my end. Also, not exactly sure why I have this package installed. Haven't specifically required it in my code.
Did some digging around, suggestion was to add in gradle.properties:
Now I'm getting more errors:
package.json
Edit: Switched to v1.0.10 and now I'm getting this instead