Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on Android 4.0.3 when preparing for InterstitialAd #50

Closed
LionbI4 opened this issue Oct 28, 2014 · 3 comments
Closed

Crash on Android 4.0.3 when preparing for InterstitialAd #50

LionbI4 opened this issue Oct 28, 2014 · 3 comments

Comments

@LionbI4
Copy link

LionbI4 commented Oct 28, 2014

Everything works well on all android devices except Android 4.0.3

The following code is crashing Unity3d application:

ad = new InterstitialAd("ca-app-pub-xxxxxxxxxxxxxxxx/xxxxxxxxxx");
AdRequest.Builder adBuilder = new AdRequest.Builder();
adBuilder.AddKeyword("game");
ad.LoadAd(adBuilder.Build());

Exception:

E/AndroidRuntime( 4175): FATAL EXCEPTION: main
E/AndroidRuntime( 4175): java.lang.Error: FATAL EXCEPTION [main]
E/AndroidRuntime( 4175): Unity version : 4.5.5f1
E/AndroidRuntime( 4175): Device model : samsung GT-P5100
E/AndroidRuntime( 4175): Device fingerprint: samsung/espresso10rfxx/espresso10rf:4.0.3/IML74K/P5100XWALD7:user/release-keys
E/AndroidRuntime( 4175):
E/AndroidRuntime( 4175): Caused by: java.lang.NoClassDefFoundError: android/os/AsyncTask
E/AndroidRuntime( 4175): at android.webkit.WebView.setupPackageListener(WebView.java:1637)
E/AndroidRuntime( 4175): at android.webkit.WebView.(WebView.java:1381)
E/AndroidRuntime( 4175): at android.webkit.WebView.(WebView.java:1342)
E/AndroidRuntime( 4175): at android.webkit.WebView.(WebView.java:1331)
E/AndroidRuntime( 4175): at android.webkit.WebView.(WebView.java:1299)
E/AndroidRuntime( 4175): at android.webkit.WebView.(WebView.java:1290)
E/AndroidRuntime( 4175): at com.google.android.gms.ads.internal.util.g.f(SourceFile:400)
E/AndroidRuntime( 4175): at com.google.android.gms.ads.internal.util.g.a(SourceFile:385)
E/AndroidRuntime( 4175): at com.google.android.gms.ads.internal.n.e.a(SourceFile:275)
E/AndroidRuntime( 4175): at com.google.android.gms.ads.internal.b.(SourceFile:290)
E/AndroidRuntime( 4175): at com.google.android.gms.ads.internal.b.(SourceFile:276)
E/AndroidRuntime( 4175): at com.google.android.gms.ads.AdManagerCreatorImpl.a(SourceFile:36)
E/AndroidRuntime( 4175): at com.google.android.gms.ads.internal.client.o.onTransact(SourceFile:66)
E/AndroidRuntime( 4175): at android.os.Binder.transact(Binder.java:297)
E/AndroidRuntime( 4175): at com.google.android.gms.internal.be$a$a.a(Unknown Source)
E/AndroidRuntime( 4175): at com.google.android.gms.internal.au.b(Unknown Source)
E/AndroidRuntime( 4175): at com.google.android.gms.internal.au.a(Unknown Source)
E/AndroidRuntime( 4175): at com.google.android.gms.internal.bi.v(Unknown Source)
E/AndroidRuntime( 4175): at com.google.android.gms.internal.bi.a(Unknown Source)
E/AndroidRuntime( 4175): at com.google.android.gms.ads.InterstitialAd.loadAd(Unknown Source)
E/AndroidRuntime( 4175): at com.google.unity.ads.Interstitial$2.run(Interstitial.java:95)
E/AndroidRuntime( 4175): at android.os.Handler.handleCallback(Handler.java:605)
E/AndroidRuntime( 4175): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 4175): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 4175): at android.app.ActivityThread.main(ActivityThread.java:4514)
E/AndroidRuntime( 4175): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 4175): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 4175): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
E/AndroidRuntime( 4175): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
E/AndroidRuntime( 4175): at dalvik.system.NativeStart.main(Native Method)

@LionbI4
Copy link
Author

LionbI4 commented Oct 28, 2014

Google play services version: 6111000
Using latest plugin from commit ab4078f

@ericleich
Copy link
Member

I'm going to close this out since it isn't an issue of the Unity plugin itself. And I don't think it's an issue with the Mobile Ads SDK or even the core Android platform.

According to the Android docs, AsyncTask was introduced back in Android 1.5. So this class should definitely exist on Android 4.0.3, unless a special build of the device (in this case a special Samsung build) removed this class.

@LionbI4
Copy link
Author

LionbI4 commented Oct 28, 2014

The thing is, when I build empty application with 1 scene and 1 simple script - everything works on the same device same android version. Full screen ad is showing fine.
It seems like it is conflicting with some other libraries: Facebook Sdk, Unibill or Google play services plugin. And I can't figure out which one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants