corona ads error on android

On a device and i get no error messege it just Crashes 2 seconds from the lanch so you launch it and after 2 seconds it crashes

Have you looked in the device’s console log? If you need help with that please read:

http://docs.coronalabs.com/guide/basics/debugging/index.html

Rob

here is the error:

13:39:10 E AndroidRuntime : FATAL EXCEPTION: AsyncTask #1 13:39:10 E AndroidRuntime : Process: com.gmail.davitzuroshvili.pizza\_tycoon, PID: 9037 13:39:10 E AndroidRuntime : java.lang.RuntimeException: An error occured while executing doInBackground() 13:39:10 E AndroidRuntime : at android.os.AsyncTask$3.done(AsyncTask.java:304) 13:39:10 E AndroidRuntime : at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) 13:39:10 E AndroidRuntime : at java.util.concurrent.FutureTask.setException(FutureTask.java:222) 13:39:10 E AndroidRuntime : at java.util.concurrent.FutureTask.run(FutureTask.java:242) 13:39:10 E AndroidRuntime : at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 13:39:10 E AndroidRuntime : at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 13:39:10 E AndroidRuntime : at java.lang.Thread.run(Thread.java:818) 13:39:10 E AndroidRuntime : Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/ads/identifier/AdvertisingIdClient; 13:39:10 E AndroidRuntime : at com.coronalabs.coronaads.DeviceInfo$DeviceInfoTask.doInBackground(DeviceInfo.java:147) 13:39:10 E AndroidRuntime : at com.coronalabs.coronaads.DeviceInfo$DeviceInfoTask.doInBackground(DeviceInfo.java:120) 13:39:10 E AndroidRuntime : at android.os.AsyncTask$2.call(AsyncTask.java:292) 13:39:10 E AndroidRuntime : at java.util.concurrent.FutureTask.run(FutureTask.java:237) 13:39:10 E AndroidRuntime : ... 3 more 13:39:10 E AndroidRuntime : Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.identifier.AdvertisingIdClient" on path: DexPathList[[zip file "/data/app/com.gmail.davitzuroshvili.pizza\_tycoon-1/base.apk"],nativeLibraryDirectories=[/data/app/com.gmail.davitzuroshvili.pizza\_tycoon-1/lib/arm, /vendor/lib, /system/lib]] 13:39:10 E AndroidRuntime : at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 13:39:10 E AndroidRuntime : at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 13:39:10 E AndroidRuntime : at java.lang.ClassLoader.loadClass(ClassLoader.java:469) 13:39:10 E AndroidRuntime : ... 7 more 13:39:10 E AndroidRuntime : Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.ads.identifier.AdvertisingIdClient 13:39:10 E AndroidRuntime : at java.lang.Class.classForName(Native Method) 13:39:10 E AndroidRuntime : at java.lang.BootClassLoader.findClass(ClassLoader.java:781) 13:39:10 E AndroidRuntime : at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) 13:39:10 E AndroidRuntime : at java.lang.ClassLoader.loadClass(ClassLoader.java:504) 13:39:10 E AndroidRuntime : ... 8 more 13:39:10 E AndroidRuntime : Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

I moved this to the Corona Ads forum. Let me see if I can get an engineer to look deeper into this.

Thanks

Rob

Hello,

I was able to build and run the Corona Ads sample project successfully with the build.settings you provided [0on Android ICS (4.0) and above]. Could you let me know the your testing device’s version?

Vamsee

android version is 4.2.2 but it also crashes on other devices too i have also tested that on testobject.com on real physical devices you can go ahead and do that too

Hello,

 We have received the application file and observed that code related to google play service plugin is missing  there. Please send us the building log (the log you see in corona simulator console) and build.settings file you are using for building the app. 

Lakshmana

Using java version "1.8.0\_91" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Java(TM) SE Runtime Environment (build 1.8.0\_91-b14) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode) Sep 16 15:35:37.167 Picked up JAVA\_TOOL\_OPTIONS: -Duser.language=en Sep 16 15:36:26.552 Picked up JAVA\_TOOL\_OPTIONS: -Duser.language=en Sep 16 15:36:27.019 Picked up JAVA\_TOOL\_OPTIONS: -Duser.language=en Sep 16 15:36:28.988 jar signed. Sep 16 15:36:32.289 Testing credentials for '/Users/datozuro/Keystores/Release.keystore': Building android app for davitzuroshvili@gmail.com with 2016.2932 Sep 16 15:37:57.692 Using custom build id from app bundle: 00000 (AppSettings.lua) Sep 16 15:38:01.393 BUILD SUCCESSFUL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Total time: 1 second Sep 16 15:39:20.326 BuildID: 57dbd9d3a860d Sep 16 15:40:28.142 BUILD SUCCESSFUL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Total time: 10 seconds Sep 16 15:40:28.220 Android build succeeded in 151 seconds Sep 16 15:48:30.912 2016-09-16 15:48:30.910 Corona Simulator[2751:225637] Communications error: \<OS\_xpc\_error: \<error: 0x7fff7d026b90\> { count = 1, contents = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "XPCErrorDescription" =\> \<string: 0x7fff7d026f40\> { length = 22, contents = "Connection interrupted" } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }\>

build settings:

settings = &nbsp; { &nbsp; &nbsp; &nbsp; orientation= &nbsp; &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; default="portrait", &nbsp; &nbsp; &nbsp; supported = { "portrait", "portraitUpsideDown" } &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; plugins = &nbsp; &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["plugin.coronaAds"] = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; publisherId = "com.coronalabs", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; supportedPlatforms = { android=true } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["plugin.google.play.services"] = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; publisherId = "com.coronalabs", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; supportedPlatforms = { android=true } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["shared.android.support.v4"] = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; publisherId = "com.coronalabs", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; supportedPlatforms = { android=true } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; }, &nbsp; &nbsp; -- If building for iOS, add these three entries to the "plist" table &nbsp; &nbsp; iphone = &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; plist = &nbsp; &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; NSAppTransportSecurity = { NSAllowsArbitraryLoads=true }, &nbsp; &nbsp; &nbsp; &nbsp; NSLocationAlwaysUsageDescription = { "" }, &nbsp; &nbsp; &nbsp; &nbsp; NSLocationWhenInUseUsageDescription = { "" }, &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; }, &nbsp; }

here is the error:

20:25:29 E AndroidRuntime : FATAL EXCEPTION: AsyncTask #1 20:25:29 E AndroidRuntime : Process: com.gmail.davitzuroshvili.pizza\_tycoon, PID: 15698 20:25:29 E AndroidRuntime : java.lang.RuntimeException: An error occured while executing doInBackground() 20:25:29 E AndroidRuntime : at android.os.AsyncTask$3.done(AsyncTask.java:304) 20:25:29 E AndroidRuntime : at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) 20:25:29 E AndroidRuntime : at java.util.concurrent.FutureTask.setException(FutureTask.java:222) 20:25:29 E AndroidRuntime : at java.util.concurrent.FutureTask.run(FutureTask.java:242) 20:25:29 E AndroidRuntime : at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 20:25:29 E AndroidRuntime : at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 20:25:29 E AndroidRuntime : at java.lang.Thread.run(Thread.java:818) 20:25:29 E AndroidRuntime : Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/ads/identifier/AdvertisingIdClient; 20:25:29 E AndroidRuntime : at com.coronalabs.coronaads.DeviceInfo$DeviceInfoTask.doInBackground(DeviceInfo.java:147) 20:25:29 E AndroidRuntime : at com.coronalabs.coronaads.DeviceInfo$DeviceInfoTask.doInBackground(DeviceInfo.java:120) 20:25:29 E AndroidRuntime : at android.os.AsyncTask$2.call(AsyncTask.java:292) 20:25:29 E AndroidRuntime : at java.util.concurrent.FutureTask.run(FutureTask.java:237) 20:25:29 E AndroidRuntime : ... 3 more 20:25:29 E AndroidRuntime : Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.identifier.AdvertisingIdClient" on path: DexPathList[[zip file "/data/app/com.gmail.davitzuroshvili.pizza\_tycoon-1/base.apk"],nativeLibraryDirectories=[/data/app/com.gmail.davitzuroshvili.pizza\_tycoon-1/lib/arm, /vendor/lib, /system/lib]] 20:25:29 E AndroidRuntime : at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 20:25:29 E AndroidRuntime : at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 20:25:29 E AndroidRuntime : at java.lang.ClassLoader.loadClass(ClassLoader.java:469) 20:25:29 E AndroidRuntime : ... 7 more 20:25:29 E AndroidRuntime : Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.ads.identifier.AdvertisingIdClient 20:25:29 E AndroidRuntime : at java.lang.Class.classForName(Native Method) 20:25:29 E AndroidRuntime : at java.lang.BootClassLoader.findClass(ClassLoader.java:781) 20:25:29 E AndroidRuntime : at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) 20:25:29 E AndroidRuntime : at java.lang.ClassLoader.loadClass(ClassLoader.java:504) 20:25:29 E AndroidRuntime : ... 8 more 20:25:29 E AndroidRuntime : Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

So far I haven’t been able to reproduce this issue. Just to make sure there is no weirdness around plugin permissions, I created a new developer account, logged into Simulator with the new account credentials, used your build.settings to build the Corona Ads Sample app. The build was successful and I am able to run the sample app on Android ICS and above.

One of my colleagues had forwarded the APK you had sent. We extracted the APK and found out that the google-play-services library is not included in the APK - which corresponds with the crash log you provided.

Could you try the following steps:

  • Open Corona Simulator

  • Logout [Corona Simulator -> Preferences -> De-authorize and Quit]

  • Quit Corona Simulator

  • Open Corona Simulator and Login

  • Build Corona Ads Sample project

Hope this helps.

i have deauthorized it and activeted again  but still crashes

i have built corona ads project it works fine but when i copy corona ads build settings file and paste in my build setting it is still crashing

guys how do i add “com.google.android.gms.ads.identifier.AdvertisingIdClient”

guys help me

so i am writing beacause i fixed it with removing supportedplatform on every plugin literily every plugin google play or some other plugin

guys i fixed this using this method i deleted supportedplatforms line on every plugin