Application Validation Error / Incorrect splash screen

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.  

Thanks again for you superb customer service Rob

Glad you’re going!

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

 

  1.   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

  2.   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 

Thanks Rob for all your help, couldn’t have made it happen without your insights!

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

When building Android Native apps, your plugin files (.jar, .so) need to go into your:

App/android/app/src/main/jniLibs/armeabi-v7a

folder.

Rob

Hi,

I see that the docs at

https://docs.coronalabs.com/native/android/index.html
say “libs/ — This is where third-party (Corona) .jar plugins that your app relies upon should go.”

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:

 

Information:Gradle tasks [:app:assembleDebug, :plugin:assembleDebug]
Error:Execution failed for task ‘:app:transformClassesWithDexForDebug’.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lplugin/library/BuildConfig;
Information:BUILD FAILED

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?

Thanks so much.

John

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.

Let me see if I can get someone with a little more experience using Android Studio to answer the question.

What plugin are you adding to the project? 

Are you trying to build the plugin sub-project?

Thanks

Rob

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?

Thanks Rob I see you wrote as I was typing up my last post. I can’t seem to get these 2 plugins to work together:

plugin.externalStorage.jar

plugin.equalizer.jar

They are both by the same plugin developer

They both have in the decomplied BuildConfig this: “package plugin”.library which seems to cause the multiple dex files error.

I pasted these jars along with the other 6 into the following folder, so I’m using the /app/ not the /plugin/ module:

/Users/jm/Documents/TEST300/App/android/ app /libs/

I had to create the libs folder for some reason, I don’t see it in the projectTemplate. If I have that wrong please let me know.

Thanks again

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.

Rob

I’m having the same issue. When the app opens after a compile in Xcode I get this screen

My custom splash has worked fine for a long while until this sudden error.

I’m using 3168

I do subscribe to the splash plugin but for some odd reason there are two in my account, one to renew, and one doesn’t expire until 2018.

Help -

corona-splash-error.jpg

The exact SAME issue here.

We’ve worked with our own splash image fine for a long time, then all of a sudden this message.

We’ve bought the Splash Control for the second time, the new one will expire next year. We’re working with Corona 3179.

Please Help, it’s stopping us from developing.

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).

I’ve done that (and a few other things) and it’s fixed for now.

Unfortunately, I can’t point to the exact steps that fixed it.

Thanks

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…

Rob

Hi Rob,

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?

Thanks