learningequality / kolibri-installer-android

Android wrapper for Kolibri.
MIT License
26 stars 22 forks source link

Build failed: Could not find `android` or `sdkmanager` binaries in Android SDK [kolibri 15, sdk 30] #97

Closed MBKayro closed 2 years ago

MBKayro commented 2 years ago

In the lastest branch master or develop, for kolibri 15

--- Assigning Build Number Buildkite build # not found, using dev alternative 2201261007 pew init android Verbose output set. PATH = /usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-8-openjdk-amd64:/home/kivy/.pyeverywhere/native/android/android-ndk-r21:~/.local/bin:/home/kivy/.pyeverywhere/native/android/android-sdk-linux/platform-tools:/home/kivy/.pyeverywhere/native/android/android-sdk-linux/tools:/home/kivy/.pyeverywhere/native/android/apache-ant-1.9.9/bin Copying latest dependencies into project... Running command ['/bin/bash', '/src/pyeverywhere/native/android/init.sh'] Dir is /home/kivy/.pyeverywhere/native/android Script Dir is /src/pyeverywhere/native/android Android SDK is /home/kivy/.pyeverywhere/native/android/android-sdk-linux Android NDK is /home/kivy/.pyeverywhere/native/android/android-ndk-r21 Platform is linux NDK version is r21 Downloading https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.9-bin.tar.gz Running command: p4a create --arch armeabi-v7a --dist_name Madrassati_dist --bootstrap webview --requirements python3,android,pyjnius,genericndkbuild,sqlite3,cryptography,twisted,attrs,bcrypt,service_identity,pyasn1,pyasn1_modules,pyopenssl,openssl,six,flask PATH = /usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-8-openjdk-amd64:/home/kivy/.pyeverywhere/native/android/android-ndk-r21:~/.local/bin:/home/kivy/.pyeverywhere/native/android/android-sdk-linux/platform-tools:/home/kivy/.pyeverywhere/native/android/android-sdk-linux/tools:/home/kivy/.pyeverywhere/native/android/apache-ant-1.9.9/bin [WARNING]: $ANDROIDNDKVER is deprecated and no longer necessary, the value you set is ignored INFO: Will compile for the following archs: armeabi-v7a INFO: Found Android API target in $ANDROIDAPI: 30 [ERROR]: Build failed: Could not find android or sdkmanager binaries in Android SDK INFO: Instructions: Make sure the path to the Android SDK is correct

=== > without upgrade sdk to 30 and with old git source for pyeverywhere and kolibri 15 i ahve adifferente error :

   A problem occurred evaluating root project 'Kolibri_dist__armeabi-v7a'.

Could not find method versionCode() for arguments [2201261156] on DefaultConfig_Decorated{name=main, dimension=null, minSdkVersion=DefaultApiVersion{mApiLevel=21, mCodename='null'}, targetSdkVersion=DefaultApiVersion{mApiLevel=29, mCodename='null'}, renderscriptTargetApi=null, renderscriptSupportModeEnabled=null, renderscriptSupportModeBlasEnabled=null, renderscriptNdkModeEnabled=null, versionCode=null, versionName=null, applicationId=null, testApplicationId=null, testInstrumentationRunner=null, testInstrumentationRunnerArguments={}, testHandleProfiling=null, testFunctionalTest=null, signingConfig=null, resConfig=null, mBuildConfigFields={}, mResValues={}, mProguardFiles=[], mConsumerProguardFiles=[], mManifestPlaceholders={}, mWearAppUnbundled=null} of type com.android.build.gradle.internal.dsl.DefaultConfig.

rtibbles commented 2 years ago

We are currently overhauling the build process for the APK, which should hopefully resolve these issues.

MBKayro commented 2 years ago

Thank you, that will be great

MBKayro commented 2 years ago

Hi @rtibbles, just to know the above errors is it concern kolibri or android python installer ?

Could not find method versionCode() for arguments [2201261156] on DefaultConfig_Decorated{name=main, dimension=null, minSdkVersion=DefaultApiVersion{mApiLevel=21, mCodename='null'}, targetSdkVersion=DefaultApiVersion{mApiLevel=29, mCodename='null'}, renderscriptTargetApi=null, renderscriptSupportModeEnabled=null, renderscriptSupportModeBlasEnabled=null, renderscriptNdkModeEnabled=null, versionCode=null, versionName=null, applicationId=null, testApplicationId=null, testInstrumentationRunner=null, testInstrumentationRunnerArguments={}, testHandleProfiling=null, testFunctionalTest=null, signingConfig=null, resConfig=null, mBuildConfigFields={}, mResValues={}, mProguardFiles=[], mConsumerProguardFiles=[], mManifestPlaceholders={}, mWearAppUnbundled=null} of type com.android.build.gradle.internal.dsl.DefaultConfig.

rtibbles commented 2 years ago

This is definitely an issue with Android SDK/NDK versioning, unfortunately setting up these things for use with Python for Android is a bit finicky, as this repo gets updated with new build processes, that would probably be the best guide.