dl9rdz / rdzwx-go

Apache License 2.0
24 stars 3 forks source link

apk build issue #11

Open gariac opened 2 years ago

gariac commented 2 years ago

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 cordova-android@10.1.1 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 "cordova-plugin-device@2.0.3" already fetched, using that version. Dependent plugin "cordova-plugin-device" already installed on android. Plugin dependency "cordova-plugin-badge@0.8.8" 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:

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.

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 commented 2 years ago

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

gariac commented 2 years ago

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?

dl9rdz commented 2 years ago

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