I’m just coming back after about a year off from programming apps and I’m having some issues. I started off by creating my app and testing it out using Corona Simulator version 2018.3326. This was working fine with no known issues. FYSA, I was also using the Java SDK 14.0.1. I got to the point where I wanted to upload an Alpha version onto the google play store, but I received an error that said “google play requires that app’s target api level 28 or higher”. Sure this makes since, so I did a quick google search and looked through the forum and found that if I update to the newest daily build of Corona Simulator it should fix the issue. So I did. I downloaded and installed ver 2020.3852. However, when I went to build my app, I no longer can. Instead I get error which states " Could not initialize class org.codehaus.groovy.reflection.ReflectionCache". So again, I did a google search. This time unfortunately, I have came to a stopping point. From my google search, it seems as though the problem lies with Gradle and Java SDK 14. So as some of the forums mentioned on google, and here, I uninstalled SDK 14, and tried both 8 and 11 (suggestions from the forums). Once I did this, I didn’t get any errors per say. However, when going to build the apk file it just sits there for 1 hour plus (longest I left it there).
So, now I am unable to build my APK to meet the target API level 28 that google requires. Any ideas? The only way I have even been able to build it at all was going back to 3326 and SDK 14, however doesn’t meet the target API level.
2018.3326 is ancient and it doesn’t support 64-bit Android builds, which are required by Google Play. You need a later daily build.
Have you tried building without any plugins to see if they are the issue? Install the JDK you were using previously, or the one that is mentioned in the documentation, and see if you can build any of the sample projects. If you can’t, then your issue is with the JDK. If you can, then your issue is with one of the plugins.
So i did that… I updated both then I commented out all the plugins. same issue. I then switched to JDK 11 and with no plugins it worked. However, with plugins… not so much. All i am using is Appodeal pluggins and I pulled straight from the API and edited as needed.
I basically want to be able to do interstitual and reward video ads.
settings = { orientation = { -- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight default = "landscapeRight", supported = { "landscapeRight", "landscapeLeft"}, }, -- -- Android section android = { usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.ACCESS\_COARSE\_LOCATION", "android.permission.WRITE\_EXTERNAL\_STORAGE", "android.permission.ACCESS\_FINE\_LOCATION", "android.permission.GET\_ACCOUNTS" }, applicationChildElements = { [[\<meta-data android:name="com.google.android.gms.ads.APPLICATION\_ID" android:value="Blibbidyy blobbiddy"/\> -- Yes, i have this set to correct Ap id just didnt want to display it.]], }, }, -- -- iOS section -- iphone = { xcassets = "Images.xcassets", plist = { NSAppTransportSecurity = { NSAllowsArbitraryLoads=true }, UIStatusBarHidden = false, UILaunchStoryboardName = "LaunchScreen", }, }, -- -- Plugins section -- plugins = { ["plugin.appodeal"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, --[[["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ]] -- Base ['plugin.appodeal.base'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.GoogleAdMob'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.StartApp'] = { publisherId = 'com.coronalabs' }, -- Interstitial ['plugin.appodeal.AdColony'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.AppLovin'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.Chartboost'] = { publisherId = 'com.coronalabs' }, -- ['plugin.appodeal.FacebookAudience'] = { publisherId = 'com.coronalabs' }, --Throws error! --['plugin.appodeal.Flurry'] = { publisherId = 'com.coronalabs' },--Not allowed by google for apps designed for families. ['plugin.appodeal.InMobi'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.IronSource'] = { publisherId = 'com.coronalabs' }, --['plugin.appodeal.MyTarget'] = { publisherId = 'com.coronalabs' },--Not allowed by google for apps designed for families. ['plugin.appodeal.StartApp'] = { publisherId = 'com.coronalabs' }, --['plugin.appodeal.Ogury'] = { publisherId = 'com.coronalabs' },--Not allowed by google for apps designed for families. --['plugin.appodeal.AmazonAds'] = { publisherId = 'com.coronalabs' },--Not allowed by google for apps designed for families. --['plugin.appodeal.TwitterMoPub'] = { publisherId = 'com.coronalabs' },--Not allowed by google for apps designed for families. --['plugin.appodeal.Smaato'] = { publisherId = 'com.coronalabs' }, --Throws error! -- Rewarded Video ['plugin.appodeal.Unity'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.Vungle'] = { publisherId = 'com.coronalabs' }, --['plugin.appodeal.Tapjoy'] = { publisherId = 'com.coronalabs' }, --Not allowed by google for apps designed for families. }, -- -- Project section -- excludeFiles = { -- Exclude unnecessary files for each platform all = { "Icon.png", "Icon-\*dpi.png", "Images.xcassets", }, android = { "LaunchScreen.storyboardc", }, }, }
Here’s the most recent error
17:54:21.428 Using custom Build Id 00000 17:54:21.729 Excluding specified files from build: 17:54:21.729 excluding: LaunchScreen.storyboardc 17:54:21.729 excluding: Icon.png 17:54:21.729 excluding: Icon-\*dpi.png 17:54:21.729 excluding: Images.xcassets 17:57:11.562 @ver \> NUL 17:57:11.562 Picked up JAVA\_TOOL\_OPTIONS: -Duser.language=en 17:57:11.562 Exception in thread "DisconnectableInputStream source reader" org.gradle.api.UncheckedIOException: java.io.IOException: Access is denied 17:57:11.562 at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:61) 17:57:11.562 at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:41) 17:57:11.562 at org.gradle.util.DisconnectableInputStream$1.run(DisconnectableInputStream.java:125) 17:57:11.562 at java.base/java.lang.Thread.run(Thread.java:830) 17:57:11.562 Caused by: java.io.IOException: Access is denied 17:57:11.562 at java.base/java.io.FileInputStream.readBytes(Native Method) 17:57:11.562 at java.base/java.io.FileInputStream.read(FileInputStream.java:273) 17:57:11.562 at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:245) 17:57:11.562 at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:285) 17:57:11.562 at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:344) 17:57:11.562 at org.gradle.util.DisconnectableInputStream$1.run(DisconnectableInputStream.java:96) 17:57:11.562 ... 1 more 17:57:11.562 WARNING: Plugin 'C:\Users\morfu\AppData\Local\Temp\Corona Labs\CLtmpa21980\template\app\build\corona-plugins\plugin.appodeal\_com.coronalabs' contain native library for armeabi-v7a but not for arm64. 17:57:11.562 C:\Users\morfu\AppData\Local\Temp\Corona Labs\CLtmpa21980\template\app\src\main\AndroidManifest.xml:294:11-298:50 Error: 17:57:11.562 Element activity#com.applovin.adview.AppLovinInterstitialActivity at AndroidManifest.xml:294:11-298:50 duplicated with element declared at AndroidManifest.xml:92:9-131 17:57:11.562 C:\Users\morfu\AppData\Local\Temp\Corona Labs\CLtmpa21980\template\app\src\main\AndroidManifest.xml:303:11-305:74 Error: 17:57:11.562 Element activity#com.appodeal.ads.InterstitialActivity at AndroidManifest.xml:303:11-305:74 duplicated with element declared at AndroidManifest.xml:64:11-66:81 17:57:11.562 C:\Users\morfu\AppData\Local\Temp\Corona Labs\CLtmpa21980\template\app\src\main\AndroidManifest.xml:306:9-308:74 Error: 17:57:11.562 Element activity#com.appodeal.ads.VideoActivity at AndroidManifest.xml:306:9-308:74 duplicated with element declared at AndroidManifest.xml:67:9-69:81 17:57:11.562 C:\Users\morfu\AppData\Local\Temp\Corona Labs\CLtmpa21980\template\app\src\main\AndroidManifest.xml Error: 17:57:11.562 Validation failed, exiting 17:57:11.562 17:57:11.562 FAILURE: Build failed with an exception. 17:57:11.562 17:57:11.562 \* What went wrong: 17:57:11.562 Execution failed for task ':App:processReleaseManifest'. 17:57:11.562 \> Manifest merger failed with multiple errors, see logs 17:57:11.562 17:57:11.562 \* Try: 17:57:11.562 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. 17:57:11.562 17:57:11.562 \* Get more help at https://help.gradle.org 17:57:11.562 17:57:11.562 BUILD FAILED in 2m 48s 17:57:14.278 Android build failed (1) after 173 seconds
So, I worked on it a bit more… currently have newest corona labs file and JDK 8 (according to many forums is what I should use). I used the same build.settings file as above and it came up with the same error. I then removed the
section and it would build the file. I don’t have all the ad code created yet to validate that the ads work, so I was wondering… do I need those lines? I have the following section still is this good enough or no?
I would use the plugin.beta.* of appodeal. Also when you update to the latest version of corona do you also move your code to the new template? If you don’t, I would recommend you do that also.
I thought you were doing native builds. In that case you will just get it from the Native folder of the version of Corona you are using. Then move your code to the new template. If you are not using native builds this does not apply.
For Appodeal the documentation has a list of supported network for the beta version.