Android Studio 4 and akp compiler error

Please post anything related to the Hollywood APK Compiler here
Post Reply
amyren
Posts: 131
Joined: Thu May 02, 2019 11:53 am

Android Studio 4 and akp compiler error

Post by amyren »

I am migrating my Hollywood setup to a new win10 laptop. Hollywood 8 and apk compiler 3.2 installed.
Installed the Android Studio, which is now at version 4.1.1, added the NDK and CMake from the SDK manager. Extracted the Grade 6.8 archeive and set the paths in the apk compiler settings.

Here is what I get when trying to compile something

Code: Select all

> Configure project :app
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to C:\Users\amyre\AppData\Local\Android\Sdk\ndk\22.0.7026061.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> java.lang.NullPointerException (no error message)

* 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 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8/userguide/command_line_interface.html#sec:command_line_warnings

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

I found that I could get rid of that first platforms directory missing message by copying the platforms directory from my old pc, but then it would have the android-30, since it was at android-29 when set up on my old pc. And there still will be errors

Code: Select all

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
   > org.gradle.api.file.ProjectLayout.fileProperty(Lorg/gradle/api/provider/Provider;)Lorg/gradle/api/file/RegularFileProperty;

* 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 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8/userguide/command_line_interface.html#sec:command_line_warnings

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

amyren
Posts: 131
Joined: Thu May 02, 2019 11:53 am

Re: Android Studio 4 and akp compiler error

Post by amyren »

Managed to resolve this.
First downloaded the android-ndk-r21d-windows-x86_64.zip and got the platforms folder from that archeive
Then I used the an older version of Gradle 5.6.2 instead of v6.8
Now it compiles successfully

User avatar
airsoftsoftwair
Posts: 4505
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Android Studio 4 and akp compiler error

Post by airsoftsoftwair »

Yes, as stated in the manual, APK Compiler currently doesn't support anything newer than 5.6.2:
Now close Android Studio and download and install the Gradle build tool. Go to http://gradle.org/ and download Gradle version 5.6.2 (binary only is sufficient). Installation is really simple: You just have to download the ZIP archive that contains Gradle version 5.6.2 and then unpack this ZIP file to C:\Gradle. Important: Do not use Gradle 6.x or newer. The Hollywood APK Compiler only works with Gradle 5.6.2.

Post Reply