Oh wow, a brand new copy of that folder worked. My guess is the other apk must have needed a ‘clean build’ first. I had fought with getting that one to run in the android emulator with no luck. Maybe all that trying and retrying of different things messed it up somehow. This time I just simply made a copy of /Project Template/App/ and did nothing but did Build > Build apk on the /android/app/ folder. via Android Studio. I then used google drive to get the apk onto the phone (since the mac was giving me trouble seeing my device via the usb cable). Installing this new apk worked and I got the Corona dictionary page with no errors that I could see.
To help others if they are new to Android, these are the steps I followed that worked:
1. Use Finder to make a new copy of the /app/ folder found at /Applications/Corona/Native/Project Template/ app /) and use that copy for the below
Go into Android Studio and click "Open an existing Android Studio Project’ (that option comes up in the Android Studio ‘Welcome to Android Studio’ popup window). Browse to the /android/ folder under the /app/ folder of the copy you made in the above step, Click OK
In Android Studio use the top menu to select Build > ‘Build apk’ in order to build the apk. If your emulator or usb device connection aren’t working, get the resulting apk to your device by uploading it to Google Drive (or any cloud storage) and download and install it on your device from there. (The apk that gets built and needs to be installed on your device can be found here after you ‘build’ it: /android/app/build/outputs/apk/app-debug.apk )
Maybe this or some version of this can be added to the Corona Native docs to help others that are new to Android development
By the way, has anyone gotten it to work on an Android Virtual Device? If so, can you possibly post the steps here? Android Studio seems to have the ‘Nexus SX API 26 x86’ virtual device installed by default but I kept getting failed APK installs when I click the Build/Run green triangle button. (I’m and Android newbie though so might be my fault)
I followed these steps:
Same steps 1 and 2 above, for Step 3 I just click the green Run/Build triangle at the top of Android Studio.
It gives me this message:
"Application Installation Failed
Installation failed with message: Failed to finalize session: INSTALL_FAILED_NO_MATCHING_ABS. Failed to extract native libraries, res=-113"
Searches online for that error message seem to point to to the fact that maybe I need to install a virtual device with an ARMEABI-V7a ?
So I did that, but that Virtual Device is extremely slow (takes something like 8 minutes to load) and fails in the end. I even get a popup that Android Studio strongly recommends that I use an x86 virtual device instead and that it “will be 10x faster”
Is there an Android Studio virtual device that anyone got Corona Native working with? I’m running Android Studio 2.3.3 that says it was built on June 6, 2017. Thanks
I didn’t see an existing /lib/ folder in my copy of the project template (is that correct, there is no /lib/ folder there?), so I created one and ended up with this full path
/Users/jm/Documents/TEST300/App/android/app/libs/
TEST300 is where I"m storing this project
I open Android Studio and select ‘open existing android studio project’ and select /android/ from the above path.
I do build > build apk to verify that when this project is untouched that it builds ok. No errors - it says build successful.
I dropped a Corona 3rd party plugin .jar into that /Users/jm/Documents/TEST300/App/android/app/libs/ folder.
in Android studio I then do a build > build apk, but get this error now when building:
I also tried doing build > clean project and then build > build apk but get the same error
Do the above steps work for you? Am I doing something wrong? Is there a change I need to make to the Gradle Script? Or is the debug keystore the problem?
Hmmmm. A couple of google searches on the multiple dex files error seems to point to package names. It seems the plugin .jar is using plugin.library as the package name but doesn’t let me change it because it is compiled. So I’ll try refactoring the /Users/jm/Documents/TEST300/App/android/plugin/src/main/java/plugin/library/ folder to something like …/plugin/library2/ and see if that helps.
It seems to build successfully now after refactoring that /Users/jm/Documents/TEST300/App/android/plugin/src/main/java/plugin/library/ folder to library2. (although I haven’t yet deployed to a device to test the apk runs ok)
In order to get it to build I had to remove 2 of the 8 plugins that the app needs (But I need to somehow get them back in and working)
Those 2 plugins continue to cause the Multiple dex files error since they both seem to have “package plugin.library” in their BuildConfig file. Android Studio lets me see the file by decompiling it from the jar but it doesn’t seem to let me change it.
I see this file in : /libs/plugin.externalStorage.jar > plugin > library > BuildConfig (at the top of the editor window it says "decomplied .class file, bytecode version 51.0 Java 7)
Is there any way to change the package in that file? or way to get the build to accept it? or another way to prevent getting a Multiple dex files error?
You may need to reach out to Scott and asking him about it. They go in the app folder, not the plugin folder. The plugin folder is for when you make a plugin and the plugin needs additional libraries.
Hello! I’m really to sorry to hear that. We are investigating it, for now, try to log out and login from Corona Simulator (it can be done in settings dialog).
for any other reference to this post,when you are using corona enterprise, make sure that drawable folder(with _corona_splash_screen.png in it) exists in android/res folder
Hi everybody, I’m having the same problem and it’s a bit annoying.
I have the splash screen control activated, Android native builds don’t have this problem. I tried updating to the latest build, deauthorize the computer, logout from simulator, etc etc but nothing worked.
I’m using build 3184 and I get this damn popup when I try to remove this annoying splashscreen (yes it’s annoying when your client is a big one and he doesn’t want to have anything to do with other branding)
What version of Corona was the template create in? It might be worth it to move to the new Native App templates and use them instead of older Enterprise templates.
EDIT to add: Engineering is going to see if there is an easier way…
Honestly, I am not sure but it from at least one year, before Corona Native. I tried the sample app that comes with Corona and I don’t get the popup if I delete the corona splash screen as with my app.
What changes can I do in xcode / corona to get the same result?