Skip to content
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

assembleRelease Task :notifee_react-native:extractReleaseAnnotations FAILED #560

Closed
alimorshedzadeh opened this issue Oct 19, 2022 · 8 comments

Comments

@alimorshedzadeh
Copy link

alimorshedzadeh commented Oct 19, 2022

Hi everybody i'm trying to build APK using ./gradlew assembleRelease but it fails with this error Task :notifee_react-native:extractReleaseAnnotations FAILED

This is my app config
minSdkVersion = 21 compileSdkVersion = 31 targetSdkVersion = 31
Package.json :
"@notifee/react-native": "^5.7.0",

Error Details : > Task :notifee_react-native:extractReleaseAnnotations FAILED

FAILURE: Build failed with an exception.

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
*Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1m 7s

Stuck here please help me out

@mikehardy
Copy link
Contributor

minSdkVersion = 21 compileSdkVersion = 31 targetSdkVersion = 31

You must have compileSdkVersion 33 at minimum.
That implies JDK 11 and 33 build tools as well.
You can leave minSdkVersion alone
You can targetSdkVersion alone if you are not prepared to change it yet (thus not handling notification permission in Android 13)

This is clearly mentioned in the v5 release notes but is not documented in the installation steps, so that may have caught you.

@alimorshedzadeh
Copy link
Author

@mikehardy Thank you but i've tried changing compileSdkVersion and it doesn't fix the issue
minSdkVersion = 26, compileSdkVersion = 33 , targetSdkVersion = 33
i have upgraded "@notifee/react-native": "^5.7.0" to @notifee/react-native": "^7.0.4 as well.
it works well on debug and i have no idea what's wrong with it.

@alimorshedzadeh
Copy link
Author

alimorshedzadeh commented Oct 19, 2022

Finally fixed by upgrading Gradle
upgrade classpath("com.android.tools.build:gradle:7.0.4") to classpath("com.android.tools.build:gradle:7.3.0") along with compileSdkVersion = 33 , targetSdkVersion = 33 in /android/build.gradle

@mikehardy
Copy link
Contributor

@helenaford I think the path forward might be to make a quick note on react-native module install doc mentioning these new minimums as we understand them:

  • compileSdkVersion 33 is the new minimum, with targetSdkVersion 33 required for android notification support
  • minSdkVersion currently 21
  • JDK11 required (as transitive dependency from compileSdkVersion 33 requirement)
  • android gradle plugin 7.3 appears to be the minimum

@alimorshedzadeh I wonder if gradle plugin 7.1 or 7.2 would work? It would be better to find the true minimum as opposed to just the current version (actually 7.3.1 is current right now I think - but I think you understand me, there are quite a few versions between 7.0 and 7.3, and if 7.1 works it would be better to have the real minimum).

Could you try 7.1 and/or 7.2 of android gradle plugin?

@alimorshedzadeh
Copy link
Author

alimorshedzadeh commented Oct 20, 2022

@mikehardy Yes i tried 7.1 & 7.2. there is no problem with this versions.
maybe we should consider 7.1 as the minimum .

@mikehardy
Copy link
Contributor

mikehardy commented Oct 20, 2022

Thank you! Okay, so gradle plugin 7.1 minimum, compileTargetSdkVersion 33 minimum / JDK11 minimum / so gradle (itself, not the plugin) minimum is 7.2 (https://developer.android.com/studio/releases/gradle-plugin#updating-gradle)

Now we know the matrix that will work

@mikehardy
Copy link
Contributor

I have made this change here e61114c - @helenaford not sure if the docs will publish anymore there, following #559 ?

@helenaford
Copy link
Member

@mikehardy no, sadly they won't be until we migrate the docs website over to vercel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants