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

Android Build Error #407

Open
SE-Umee opened this issue May 18, 2024 · 1 comment
Open

Android Build Error #407

SE-Umee opened this issue May 18, 2024 · 1 comment

Comments

@SE-Umee
Copy link

SE-Umee commented May 18, 2024

Hi,
I am getting this error while building the app on Android. How can I fix this?
Note Build Tools version is (30.0.3)

Configure project :notifee_react-native
:notifee_react-native @notifee/react-native found at /Users/se-umee/Desktop/apps/Motmaena_App/node_modules/@notifee/react-native
:notifee_react-native package.json found at /Users/se-umee/Desktop/apps/Motmaena_App/node_modules/@notifee/react-native/package.json
:notifee_react-native:version set from package.json: 7.8.2 (7,8,2 - 7008002)
:notifee_react-native:android.compileSdk using custom value: 33
:notifee_react-native:android.targetSdk using custom value: 33
:notifee_react-native:android.minSdk using custom value: 21
:notifee_react-native:reactNativeAndroidDir /Users/se-umee/Desktop/apps/Motmaena_App/node_modules/react-native/android
WARNING:The specified Android SDK Build Tools version (28.0.3) is ignored, as it is below the minimum supported version (30.0.3) for Android Gradle Plugin 7.4.2.
Android SDK Build Tools 30.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '28.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.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/8.0.1/userguide/command_line_interface.html#sec:command_line_warnings
5 actionable tasks: 5 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ':react-native-payments:bundleLibCompileToJarDebug'.

Could not create task ':react-native-payments:compileDebugJavaWithJavac'.
In order to compile Java 9+ source, please set compileSdkVersion to 30 or above

  • 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.

BUILD FAILED in 9s
error Failed to install the app.
info Run CLI with --verbose flag for more details.

Uploading Screenshot 2024-05-18 at 10.19.33 AM.png…

@ali5049
Copy link

ali5049 commented Sep 11, 2024

In node_modules/react-native-payments/android/src/main/java/com/reactnativepayments/ReactNativePaymentsModule.java

Search and change all the android.support to androidx

for example
android.support.annotation
Becomes
androidx.annotation

Then by using patch-package you can make a patch
After making the changes, save them and then run this command:
npx patch-package react-native-payments

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

2 participants