HTC EVO 3D X515m (shooteru) | 4 | 13.3% |
HTC_Amaze_4G (ruby) | 7 | 23.3% |
HTC One S (ville) | 2 | 6.7% |
HTC One XL (evita) | 2 | 6.7% |
HTC Sensation XL with Beats Audio X315e (runnymede) | 1 | 3.3% |
HTC One V (primou) | 3 | 10.0% |
HTC One S (villec2) | 3 | 10.0% |
ADR6425LVW (vigor) | 4 | 13.3% |
HTC One VX (totemc2) | 2 | 6.7% |
HTC Desire SV (magnids) | 1 | 3.3% |
HTC DROID Incredible 4G LTE (fireball) |
JELLY_BEAN
.I cannot say if workaround helps with 2.3.x devices, because I do not get crash reports from those. May be because I call loading ad requests from UI thread.
Looks like a work around might be to add:
try {
Class.forName("android.os.AsyncTask");
}
catch(Throwable ignore) {
// ignored
}
into your Application#onCreate()
--
---
You received this message because you are subscribed to a topic in the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/_x12qmjWI7M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Android 4.0.3 - 4.0.4
An error occurs in my app since November 23.My app does not use WebView directly. It is only AdMob.Is it caused by update of Google Play Services?Android 4.0.3 - 4.0.4HTC One XL(evita)HTC EVO 3D ISW12HT(shooterk)HTC One S(ville)java.lang.NoClassDefFoundError: android/os/AsyncTaskat android.webkit.WebView.setupPackageListener(WebView.java:1359)at android.webkit.WebView.access$10900(WebView.java:365)at android.webkit.WebView$PrivateHandler.handleMessage(WebView.java:10512)
at android.os.Handler.dispatchMessage(Handler.java:99)at android.os.Looper.loop(Looper.java:156)at android.app.ActivityThread.main(ActivityThread.java:5045)at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
public void onCreate(Bundle savedInstanceState) {
try {Class.forName("android.os.AsyncTask");} catch(Throwable ignore) {}
super.onCreate(savedInstanceState);
...........
// AdMob Mediation
googleAds.showAds(this);
.........
new RssLoadingTask().execute(url);
}
java.lang.NoClassDefFoundError: com.myapp.MyActivity$RssLoadingTask at com.myapp.MyActivity.onCreate(SourceFile:102)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1050)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3691)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670)
at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.ClassNotFoundException: com.myapp.MyActivity$RssLoadingTask in loader dalvik.system.PathClassLoader[/data/app/com.myapp-1.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511) ... 14 more
Introducir código aquí...
--
Well, now you all know what "Google Play Services ROCKS!" means. I know it for a long time due to a similar stuff with online multiplayer :-(Mikhail B. suggested a workaround in Google+ community AdMob Russia and CIS. I can confirm that it works for HTC with Android 4.0.x.WorkaroundAdd the following code to onCreate(Bundle savedInstanceState)try{Class.forName("android.os.AsyncTask"); //it prevents AdMob from crashing on HTC with Android 4.0.x}catch(Throwable ignored){}Apparently guys missed the following text in AsyncTask description
- The AsyncTask class must be loaded on the UI thread. This is done automatically as of
JELLY_BEAN
.I cannot say if workaround helps with 2.3.x devices, because I do not get crash reports from those. May be because I call loading ad requests from UI thread.
William Ferguson Founder and CEO, XandarMob |
--
To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
An error occurs in my app since November 23.My app does not use WebView directly. It is only AdMob.Is it caused by update of Google Play Services?Android 4.0.3 - 4.0.4HTC One XL(evita)HTC EVO 3D ISW12HT(shooterk)HTC One S(ville)java.lang.NoClassDefFoundError: android/os/AsyncTaskat android.webkit.WebView.setupPackageListener(WebView.java:1359)at android.webkit.WebView.access$10900(WebView.java:365)at android.webkit.WebView$PrivateHandler.handleMessage(WebView.java:10512)
at android.os.Handler.dispatchMessage(Handler.java:99)at android.os.Looper.loop(Looper.java:156)at android.app.ActivityThread.main(ActivityThread.java:5045)at java.lang.reflect.Method.invokeNative(Native Method)
William Ferguson Founder and CEO, XandarMob |
Hey guys,There is a newer version of the Google Play services apk that is starting to roll out this week (not sure what % of devices it hit yet) which has a fix for this issue. We expect to see these crashes dissipating more and more going into next week as the rollout completes.
Thanks,
Eric
On Tuesday, December 9, 2014 12:02:25 PM UTC-8, Jose D wrote:
--
---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/_x12qmjWI7M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
@Williams,
Hi Williams,First of all thank you very much for sharing the workaround.But I dont have Application class seperatelly written. So Where I can paste below code?
try {
Class.forName("android.os.AsyncTask");
}
catch(Throwable ignore) {
// ignored
I am using AsychTask in one of my Activity class to do some background task. Please refere my code below :oncreate()
{
if(loadFromBackend)
{
mytask = new MyTask();
mytask.execute();
}
}
private class MyTask extends AsyncTask<String, Integer, Void> {
private int j=0;
ProgressDialog dialog;
@Override
protected void onPreExecute() {
//Some coding stuff
}
@Override
protected Void doInBackground(String... params) {
//Some coding stuff
}
@Override
protected void onProgressUpdate(Integer... values) {
//Some coding stuff
}
@Override
protected void onPostExecute(Void result) {
//Some coding stuff
}
}
}
Create a class called MyApplication that extends from Application. Add in a reference to it in your AndroidManifest xml.
Add the code to that class.
William
--
William Ferguson Founder and CEO, XandarMob |
William Ferguson Founder and CEO, XandarMob |
I follow the work around in Application#onCreate, but on devices 2.3.x it still FC.
--