rdzwx-go icon indicating copy to clipboard operation
rdzwx-go copied to clipboard

apk build issue

Open gariac opened this issue 2 years ago • 3 comments

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

`

gariac avatar Mar 09 '22 10:03 gariac

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

dl9rdz avatar Mar 09 '22 10:03 dl9rdz

First let me say this TTGO code is amazing. Thank you.

Now regarding your question, this is the directory ~/Android/Sdk/build-tools

Inside that directory is: ls 32.0.0 32.1.0-rc1 33.0.0-rc1

In the past I have added those directories to my path but it didn't make a difference:

export PATH=$PATH:/home/mrg/Android/Sdk/platform-tools:/home/mrg/Android/Sdk/build-tools:/home/mrg/Android/Sdk/build-tools/33.0.0-rc1:.

On Wed, 09 Mar 2022 02:34:57 -0800 dl9rdz @.***> wrote:

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

gariac avatar Mar 09 '22 10:03 gariac

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

dl9rdz avatar May 18 '22 23:05 dl9rdz