I installed the latest daily build and now the Build->Android doesn’t work anymore. I am getting a 256 error. See attached. Is this happening to anyone else, is there workaround?
I found something in console:
ERROR: configuring 'plugin.fbAudienceNetwork\_com.coronalabs' failed! FAILURE: Build failed with an exception. \* Where: Build file '/private/var/folders/kg/y8hhm3qn2fg\_zypdvwdg39tw0000gn/T/CLtmp9aUu5Y/template/app/build.gradle.kts' line: 277 \* What went wrong: Could not open dsl remapped class cache for an70n180e0u86344v6da26u8g (/Users/user1/.gradle/caches/5.4.1/scripts-remapped/corona\_6pwrsb2gz2smiowekkv2oxzwk/an70n180e0u86344v6da26u8g/dsldcd040730888da95d185715568c9cc57). \> Could not open dsl generic class cache for script '/private/var/folders/kg/y8hhm3qn2fg\_zypdvwdg39tw0000gn/T/CLtmp9aUu5Y/template/app/build/corona-plugins/plugin.fbAudienceNetwork\_com.coronalabs/corona.gradle' (/Users/user1/.gradle/caches/5.4.1/scripts/an70n180e0u86344v6da26u8g/dsl/dsldcd040730888da95d185715568c9cc57). \> Could not compile script '/private/var/folders/kg/y8hhm3qn2fg\_zypdvwdg39tw0000gn/T/CLtmp9aUu5Y/template/app/build/corona-plugins/plugin.fbAudienceNetwork\_com.coronalabs/corona.gradle'. \> startup failed: General error during semantic analysis: Unsupported class file major version 57 java.lang.IllegalArgumentException: Unsupported class file major version 57 at groovyjarjarasm.asm.ClassReader.\<init\>(ClassReader.java:184)
I am getting this too for Android build. Am reverting to previous build to see if error persists.
It’s broken - Does anyone know the last good version?
Tried on a newer macBook Pro, got this:
/Applications/Corona/Corona Simulator.app/Contents/Resources/build.xml:528: Execute failed: java.io.IOException: Cannot run program "/Applications/Corona/Corona Simulator.app/Contents/Resources/zipalign" (in directory "/var/folders/h7/cmph3fzn4r70js\_n3ktkhp\_80000gn/T/CLtmpwqrzjd"): error=86, Bad CPU type in executable
This computer has Java SDK 1.8, what does Bad CPU type mean? It’s a Core i9 running Catalina.
Went back to the old MacBook (2.4Ghz i5) and rolled back to 2019.3487 – Worked.
Would love to know why my brand new i9 is a “bad CPU” – see previous, but for now, looks good.
Oh crap, spoke too soon – that version built the apk but when I upload to google
Upload failed
Your app currently targets API level 27 and must target at least API level 28 to ensure it is built on the latest APIs optimized for security and performance. Change your app’s target API level to at least 28. Learn how.
I’m guessing I need a more recent version of Corona SDK, but then the facebook plugin is gonna fail right? So I am caught in a trap?
I would suggest everyone read the top post on this thread: https://forums.coronalabs.com/topic/75790-handling-bugs-with-android-x64-and-target-sdk-28/
And then crank up your console logging level. Capture the entire build. Use a service like pastebin.com and share the link here and we can take a look.
Generally speaking, an error 256 is a problem downloading a plugin, but having more info will help.
As an FYI you need to use 2019.3529 or later which has the required Android SDK 28+ support (supports 29) and it also meets Google’s 64 bit requirement.
2019.3549
build.settings https://pastebin.com/0LhpJEmz
console log output https://pastebin.com/zgiavBZw
At a minimum you need to:
-
Remove this from build.settings
[“plugin.google.play.services”] =
2.
{
3.
publisherId = “com.coronalabs”,
4.
supportedPlatforms = { android=true, [“android-kindle”]=true },
5.
},
6.
- I highly recommend changing to the .v4a version of the Facebook plugin. I have no idea if the .v4 plugin was updated to a more modern build platform.
I’ll share this with engineering, but I would suggest making those two changes and see if it helps.
Rob
Thx, made the changes. Did try again…
I’m happy to debug myself but don’t know what the output means…
I see a lot of references to Java 1.13. We’ve found that Java JDK 1.8 works better. Can you try to downgrade to that and try?
Rob
I had set the java version to 1.8, but somehow the simulator was still picking up 13 … thanks for pointing that out… once I totally remove 13 the build worked.
Got /Applications/Corona/Corona Simulator.app/Contents/Resources/build.xml:528: Execute failed: java.io.IOException: Cannot run program “/Applications/Corona/Corona Simulator.app/Contents/Resources/zipalign” (in directory “/var/folders/h7/cmph3fzn4r70js_n3ktkhp_80000gn/T/CLtmpwqrzjd”): error=86, Bad CPU type in executable
with java in simulator 1.8
Any solutions?
Anna,
Are you sure it’s using 1.8?, because I thought mine was, but it was not the case. Also try deleting everything from output directory and doing build again.
This worked for me:
cp /path/to/Android/sdk/build-tools/29.0.0/zipalign ‘/Applications/Corona/Corona Simulator.app/Contents/Resources/zipalign’
The zipalign shipped in Corona Simulator is 32-bit and I’m running macOS Catalina, which has removed 32-bit support. The zipalign in the Android build tools is 64-bit.
This is weird. Modern android build system doesn’t rely on zipalign shipped with corona. It probably should be removed.
Which daily build are you using?
Yes, problem was definitely with macOS Catalina and support of 32-bit version.
Using newer daily build helped