APK Compiler fail to compile

Please post anything related to the Hollywood APK Compiler here
Post Reply
matty47
Posts: 18
Joined: Fri May 21, 2021 10:28 am

APK Compiler fail to compile

Post by matty47 »

It's been a while since I used the APK Compiler and when I tried it recently I ran into problems. As my system has been used for many differrent programming languages I have installed the following in a new Win 10 VM.
Android Studio 2022.3.1
Android SDK 33 (only)
NDK 21.4.7075529 and 23.1.7779620 (APK Compiler set to use the second one)
Gradle 6.7.1
Android SDK Compiler 4.4 Pro
There is no other JDK in the VM apart from that in Android Studio (although I have tried previouslywith JDK17 installed)
When I try to compile I get the following error
* What went wrong:
Could not compile settings file 'C:\Users\mingl\AppData\Local\AirsoftSoftwair\APKCompiler\com.immi.g1\settings.gradle'.
> startup failed:
General error during semantic analysis: Unsupported class file major version 61

java.lang.IllegalArgumentException: Unsupported class file major version 61
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:196)
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:177)
followed by a lot of similar lines.
Finally there is an error that gradlew is not a recognised command.
When I look up the first fail I get
It means Java 17 (major version 61) compiled the class file, and if we try to run the class file under Java 16 and below environment,
The version installed with Android Studio shows as openjdk version "17.0.6" 2023-01-17.
I am waiting for a new hard drive so that I can start with a new WIn installation on my old desktop and I will try installing from scratch on that machine.
Anyone else have problems with this? Is there something I did not do?
I would really like to get this working as my previous compiled apps work really well on my android phone.
matty47
Posts: 18
Joined: Fri May 21, 2021 10:28 am

Re: APK Compiler fail to compile

Post by matty47 »

So I tried with a brand new install of Win 10 and the same setup as noted previously. Again the same failure.
Oh pity - but I don't know how to fix or where to go from here
djg
Posts: 16
Joined: Wed Feb 12, 2020 10:37 pm

Re: APK Compiler fail to compile

Post by djg »

Hi matty47,

I have almost the exact same problem. I installed the APK-compiler version 4.4 over version 4.1 and that went fine. But maybe I did something wrong, because when I try to compile something I get the same errors as you. I updated and re-installed Android Studio but that did not help. I also planned on a completely fresh install, but I think I'll wait now.
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: APK Compiler fail to compile

Post by airsoftsoftwair »

Ok, I can reproduce the problem with the latest Android Studio. Seems something has changed internally in Android Studio. I'll try to provide a fix shortly.
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: APK Compiler fail to compile

Post by airsoftsoftwair »

Actually, fixing this looks rather complicated and it's probably not worth the effort because normally in autumn there will be a new major Android Studio release which is likely to break things again so I'd rather wait for this release before I provide a fix.

So I'd recommend to just downgrade to Android Studio Electric Eel and everything should be fine. First do a proper uninstall of Android Studio following these instructions and then download and install Android Studio Electric Eel from here. Don't forget to clean all your targets in APK Compiler before trying to build anything!
Post Reply