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

apk build issue #11

Open
gariac opened this issue Mar 9, 2022 · 3 comments
Open

apk build issue #11

gariac opened this issue Mar 9, 2022 · 3 comments

Comments

@gariac
Copy link

gariac commented Mar 9, 2022

The main problem is build-tools isn't found but they are installed. However adding android to cordova also generates an error.
Running on Opensuse 15.3

`cordova platform add android
Using cordova-fetch for cordova-android@^10.1.1
Adding android project...
android-targetSdkVersion should be greater than or equal to 30.
Creating Cordova project for the Android platform:
Path: platforms/android
Package: de.dl9rdz
Name: rdzSonde
Activity: MainActivity
Android target: android-30
Subproject Path: CordovaLib
Subproject Path: app
Android project created with [email protected]
Installing "cordova-plugin-badge" for android
Subproject Path: CordovaLib
Subproject Path: app
Installing "cordova-plugin-device" for android
Installing "cordova-plugin-inappbrowser" for android
Installing "cordova-plugin-local-notification" for android
android-sdk version check failed (/home/mrg/android/rdzwx-go/platforms/android/cordova/android_sdk_version), continuing anyways.
Plugin dependency "[email protected]" already fetched, using that version.
Dependent plugin "cordova-plugin-device" already installed on android.
Plugin dependency "[email protected]" already fetched, using that version.
Dependent plugin "cordova-plugin-badge" already installed on android.
Subproject Path: CordovaLib
Subproject Path: app
Installing "cordova-plugin-whitelist" for android
Plugin doesn't support this project's cordova-android version. cordova-android: 10.1.1, failed version requirement: >=4.0.0 <10.0.0
Skipping 'cordova-plugin-whitelist' for android
Installing "de-dl9rdz-rdzwx" for android


cordova build
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=/home/mrg//Android/Sdk (recommended setting)
ANDROID_HOME=undefined (DEPRECATED)
Using Android SDK: /home/mrg/Android/Sdk

Welcome to Gradle 6.7.1!

Here are the highlights of this release:

  • File system watching is ready for production use
  • Declare the version of Java your build requires
  • Java 15 support

For more details see https://docs.gradle.org/6.7.1/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

BUILD SUCCESSFUL in 4s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app

FAILURE: Build failed with an exception.

  • Where:
    Script '/home/mrg/android/rdzwx-go/platforms/android/CordovaLib/cordova.gradle' line: 69

  • What went wrong:
    A problem occurred evaluating script.

No installed build tools found. Install the Android build tools version 30.0.3 or higher.

  • 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.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1s
Command failed with exit code 1: /home/mrg/android/rdzwx-go/platforms/android/gradlew cdvBuildDebug -b /home/mrg/android/rdzwx-go/platforms/android/build.gradle

`

@dl9rdz
Copy link
Owner

dl9rdz commented Mar 9, 2022

what version of the android build-tools do you have installed? And where is it installed?

@gariac
Copy link
Author

gariac commented Mar 9, 2022 via email

@dl9rdz
Copy link
Owner

dl9rdz commented May 18, 2022

Finally had some time to look at that...

Seems like for some reason you need exactly version 30.0.3 (in Android Studio you can see all version selecting show package details)

After that I had still some compile issues which I was able to fix with

cordova plugin add cordova-plugin-androidx-adapter
npm i jetifier
npx jetifier

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