Page 1 of 1

Cannot find Android 2.3 (API 9) developer files

PostPosted: Tue Nov 21, 2017 2:49 pm
by lazi
I had to reinstall APK compiler and all of the android stuff. Tried to follow the documentation, but I got this message when try to compile:
"Cannot find Android 2.3 (API 9) developer files in your Android NDK installation!"

The ndk folder C:\Users\user\AppData\Local\Android\Sdk\ndk-bundle\platforms has subfolders named android-14 up to android-27.
Should be there an android-9?
Such an old NDK is not listed in the android ndk site. (https://developer.android.com/ndk/downl ... eases.html)

Re: Cannot find Android 2.3 (API 9) developer files

PostPosted: Thu Nov 23, 2017 9:45 am
by lazi
Some additional info.
System is 64 bit win10/home
Java installed 64 bit 8/152
Jdk installed 64 bit 8/152
Android studio 3.0.1.0

Re: Cannot find Android 2.3 (API 9) developer files

PostPosted: Fri Nov 24, 2017 1:12 am
by lazi
Found the API 9 NDK here:
http://dl.google.com/android/ndk/androi ... x86_64.zip

Unfortunately that is not solved my problem:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to find target with hash string 'android-27' in: C:\Users\apa\AppData\Local\Android\Sdk

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
'gradlew' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .

Re: Cannot find Android 2.3 (API 9) developer files

PostPosted: Fri Nov 24, 2017 5:42 pm
by airsoftsoftwair
These things will of course happen again and again because Google changes the layout of the Android SDK and NDK all the time and APK Compiler needs to be adapted in order to stay compatible with it. I'll fix this for the next version. Until then, use an older SDK/NDK version :)

Re: Cannot find Android 2.3 (API 9) developer files

PostPosted: Sun Nov 26, 2017 1:08 am
by lazi
Thanks! It is working now. Gradle still says error at the end, but the apk is built and working under android.

Re: Cannot find Android 2.3 (API 9) developer files

PostPosted: Fri Dec 08, 2017 10:11 pm
by airsoftsoftwair
I've looked into this now and adapted the APK Compiler accordingly. The downside is that you'll no longer be able to compile for Android versions older than 4.0. This is because Google removed support for Android versions older than 4.0 from the latest NDK. There'll be an update for the APK Compiler soon so that it works with the latest Android Studio again but people who have a working setup should always think twice before upgrading their Android Studio or the APK Compiler because as time goes by, more and more of the support for the old platforms will be removed. There's nothing I can do against this.

Code: Select all
- Change: Separate installations of the JDK and Gradle are no longer necessary; the APK Compiler
  uses the JDK and Gradle that is shipped with Android Studio now
- Fix: Fixed the APK Compiler for Android Studio 3.0.0; since the NDK r16 doesn't support older
  versions than Android 4.0 any longer, APKs compiled by the APK Compiler also require at least
  Android 4.0 now

Re: Cannot find Android 2.3 (API 9) developer files

PostPosted: Sun Dec 10, 2017 11:07 am
by lazi
How sad that you had to waste time for such problems. :(

I think that product life of Android devices are quite short, so not a big loss if older version are not supported.

I have a book about AmigaDOS which has the words in the cover with small friendly letters: "If you see 2.0 you won't want to go back!"

Anyway congratulations to mainstream developers for the version naming madness they use today!

Re: Cannot find Android 2.3 (API 9) developer files

PostPosted: Sun Jan 14, 2018 11:16 am
by PEB
I'm running into this same problem. So what's the best way to fix this? What needs to be done to install an old SDK/NDK?

Re: Cannot find Android 2.3 (API 9) developer files

PostPosted: Sun Jan 14, 2018 5:39 pm
by PEB
With the release of APK Compiler 2.1, everything is working again.
Thanks!