Closed dayaki closed 2 years ago
+1
Facing the same issue here, any leads on this?
I had the same error, I don't think it was in the code push lib exactly tho, but I leave it here in case it helps someone, I bumped the target sdk to 31 because of another lib, this caused all sorts of problems. but after digging around I managed to leave it at sdk 30 by forcing an android dep to resolve to a lower version, turns out it was trying to use a release candidate version, here is how to force the dependency version, again I don't know if your problem is the same, I just had a similar error: android/app/build.gradle
android {
[...]
configurations.all {
resolutionStrategy {
force 'androidx.browser:browser:1.3.0'
}
}
}
Same issue, unfortunately @pedroraft's solution doesn't work on my end. But the cause is likely the same. I had to update the sdk to 31 for another library while upgrading our app to RN 0.66.3
.
RN: 0.66.3 TargetSdkVersion 31 Same issues, but after upgrade jdk to 11 and it's working fine Try to upgrade jdk to 11 :)
in my case, i had set compileSdkVersion
31 and targetSdkVersion
30 before. now, i set both to 30 and worked well.
RN: 0.66.3 TargetSdkVersion 31 Same issues, but after upgrade jdk to 11 and it's working fine Try to upgrade jdk to 11 :)
This works 🎉
upgrading to jdk 11 worked
For me updating to JDK 11 unfortunaltly does not work. To use react-native-vision-camera I need sdk 31 though. If anybody has an idea how to solve this dilemma I would be greatfull.
I was able to solve it. I had to upgrade the jdk that is referenced in JAVA_HOME in the environment variables, not only in Android studio.
https://github.com/microsoft/appcenter/issues/2067#issuecomment-888853402
For me, I also had to force AppCenter to use JDK 11 for native builds
I had java 8, saw this error, then I just did:
sdk use java 11.0.14-ms
To install it if you dont have this version, it's just
sdk install java 11.0.14-ms
and it worked. I am on M1 Mac, not rosetta 2 terminal. Hope it helps!
in my case, i had set
compileSdkVersion
31 andtargetSdkVersion
30 before. now, i set both to 30 and worked well.
This worked for me
If you don't want to downgrade the compileSdkVersion
or targetSdkVersion
you can try downloading JDK 11 (worked for me).
Here's a guide on how to install it via homebrew for Mac users: https://medium.com/@kirebyte/using-homebrew-to-install-java-jdk11-on-macos-2021-4a90aa276f1c
This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.
This issue will now be closed because it hasn't had any activity for 15 days after stale. Please feel free to open a new issue if you still have a question/issue or suggestion.
I was having trouble and nothing was working. I was trying to debug in android studio by running the react-native-code-push:compileDebugJavaWithJavac
directly like so
I right clicked it and hit "edit run configuration" and then added the three flags --debug --stacktrace --scan
; for whatever the reason, now it compiles just fine. I'm assuming it has something to do with some kind of gradle caching issue. But I don't know how to best clean that cache.
I upgraded to react-native 0.66.0 and codepush stopped working, I keeping the error:
> Task :react-native-code-push:compileDebugJavaWithJavac FAILED An exception has occurred in the compiler (1.8.0_301). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you. java.lang.AssertionError: annotationType(): unrecognized Attribute name MODULE (class com.sun.tools.javac.util.UnsharedNameTable$NameImpl)
Any help would be appreciated.