Okay, I think I have reproduced the error you are getting. I too had to disable the Proguard call; it looks in hindsight like I never properly tested the release build before publishing. There is a proguard rules file but it’s in the wrong directory and the names don’t match (woops).
Am I correct in concluding that you are using Build \> Generate Signed APK
to trigger the build process? If you set the Build Variant to Release (there should be a little sidebar accessible from the bottom left of the AS window) and just hit the “Run” button to trigger the build, does it work? (The APK will end up in ...app/build/outputs/apk/
)
I’m not certain how AS integrates the Release Keystore information you have provided through the GUI into the build process; I have always used a “manually” generated one. As you read in that comment, I found that there doesn’t seem to be a good place to inject the Corona signing, so with the additional tasks that I wrote what happens is something like this:
-
The Corona build script is triggered because I made it a dependency for step 2
-
The Android Gradle plugin merges assets.
-
… the rest of the regular build. If the Release build variant is selected then a signed release APK is generated,
which except for missing a valid Corona signature would run just fine.
-
CertifyBuild.sh is triggered. The script extracts the APK and signs the native libraries inside, which invalidates the original keystore signature from step 3.
-
A custom task re-signs the APK with either the debug or release keystore info from the android.signingConfigs
section of the Gradle file depending on the build variant, essentially using CLI commands to sign the APK manually. (You can see exactly which commands are used inside the resignApk
function.)
I hadn’t experimented with getting the “Generate Signed APK” feature of AS working, but that would certainly be nice to have… I suspect the CertifyBuild call is failing because the CORONA_APK_PATH value is being derived from the path you gave in the “Generate Signed APK” dialog, but at that point in the build the APK has not been moved to that final location yet.
PS: I do not experience the problem you describe with AS hanging when you edit a Gradle file. That sounds very frustrating. At first I thought it might be AS triggering a Gradle Sync automatically for you while perhaps I had that turned off, but 30-60 seconds seems like much too long for that.
PPS: To get the coronaLib
module fully up to date, in addition to copying the JARs over, you may also want to copy the contents of ‘/Applications/CoronaEnterprise/Corona/android/lib/Corona/libs/armeabi-v7a’ into ‘<ProDir>/android/coronaLib/src/main/jniLibs/armeabi-v7a’ (updating the native components).