-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Execution failed for task ':react-native-push-notification:compileReleaseJavaWithJavac' #808
Comments
I got this error too after updated to version 3.1.1 |
@ahmedu007 I think that error is referred to #801 and also @Danferd is right, I had to downgrade to version 3.0.2 |
You need to use at least SDK 26. Your app will not be accepted on Play store if you target an older SDK than 26. |
@Gp2mv3 any reason why Play store would reject the app? And downgrading to the version 3.0.2, Would I have problems with Play store? |
The first sentence of this page: https://developer.android.com/distribute/best-practices/develop/target-sdk 😉 |
@Gp2mv3 thanks 😬!! |
@Gp2mv3 is it only the targetSdkVersion that i must update to 26 or compileSdkVersion also? |
I'm using targetSdkVersion 26 but still failed to sign the apk. compileSdkVersion: 26 |
Just fixed it by adding this to android/build.gradle file:
|
Going back to 3.0.2 fixed the issue. I've also updated the SDK to use 27 now. But it still wont build on the latest version. The same error comes back |
Fixed this issue by following instructions in the First step of Android manual installation In your android/build.gradle
|
Im using :
and still get this error. |
I've already got that in the android/build.gradle
|
I solved this issue by keeping the version same both side. Inside my project: android/build.gradle:
android/app/build.gradle:
Inside react-native-push-notification/android/build.gradle
|
This configuration worked for me. Change values to these inside react-native-push-notification/android/build.gradle
|
@emilisb - where did you add these changes? |
@magick93 inside react-native-push-notification/android/build.gradle |
Ok thanks. But then I will need to commit this module to git? |
no need to change nodemodules just use this "android/build.gradle" ` buildscript {
} allprojects { ext { ` |
@neel132 C:\Users\Wilson\Desktop\NotificationApp\node_modules\react-native-push-notification\android\src\main\java\com\dieam\reactnativepushnotification\modules\RNPushNotificationHelper.java:162: error: constructor Builder in class Builder cannot be applied to given types; FAILURE: Build failed with an exception.
BUILD FAILED Total time: 51.93 secs Inside my Project
android\build.gradle Inside react-native-push-notification/android/build.gradle dependencies { Any help or suggestions would be greatly appreciated. Thanks |
I merger PR #826 that should fix this issue. Can you confirm ? |
BUILD FAILED Total time: 1 mins 0.69 secs C:\Users\Wilson\Desktop\Desktop\React Native Projects\NotificationApp>react-native run-android FAILURE: Build failed with an exception.
BUILD FAILED Total time: 16.869 secs Inside my Project compileSdkVersion 27 defaultConfig { Inside react-native-push-notification/android/build.gradle dependencies { |
after manual link on android, install older version with "npm install --save react-native-push-notification@2.0.1" fixed Javac issue |
@GabrielScalici |
Had the same issue. The fix was not to set the support lib version at all. |
We also hit this issue with version 3.1.1 and RN 0.55.4. Here's a patch of the commit which fixed this for our project https://gist.github.com/epeli/e5b192c3b75ba84e5ec695d124de1e86 We also hit some compatibility issues with react-native-maps too... Hence the changes for I also manually merged #826 to my node_modules. |
@epeli Thank you so much. you save me. |
Only works with downgrade... |
@GleidsonDaniel I've been using 3.1.1 since release without any problems. Here's the configurations that I've been using on my android/build.gradle
|
When will we have an official release with the right fix instead of doing workaround like above? |
@haotangio put this code at the end of the android/build.gradle |
I'm still getting this error with the latest version of the lib (3.1.2). @emilisb solution worked though. Can this be fixed upstream? We have to apply this patch every time you |
(use lower version to avoid the issues :-) in your (package.json) and in your (android/build.gradle) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions. |
This issue appeared again with version 7.2 for me. 7.3 seems to resolve it... |
Hi,
I'm sorry if this has been resolved already, but I've been stuck with this for a while now. I've installed the package, and did the link as per the
README
. Added the extra info in theAndroidManifest.xml
after doing a link. I even tried to install the package and do a manual installation for android. It keeps failing to build.My build.gradle looks like this
defaultConfig { applicationId "exampleProject" minSdkVersion 16 targetSdkVersion 22 versionCode 1 versionName "1.0" ndk { abiFilters "armeabi-v7a", "x86" } }
The error that I get is:
Any help or suggestions would be greatly appreciated. Thanks
The text was updated successfully, but these errors were encountered: