MapView throwing IllegalArgumentException - wrong image size: 192 192

I get excessive crash reports from users on the Samsung Vibrant Galaxy S. After finding solutions to this problem, the only thing I encountered was an open problem in Google Code: http://code.google.com/p/android/issues / detail? id = 4599

The thread suggests expanding MapView and catching exceptions. Is this a better approach, or is there something better? I would like to completely fix this problem, and not put a bandage on it.

Here's the stack trace:

java.lang.IllegalArgumentException: wrong image size: 192 192 at com.google.googlenav.map.MapTile.getImage(Unknown Source) at com.google.googlenav.map.Map.drawTile(Unknown Source) at com.google.googlenav.map.Map.drawMapBackground(Unknown Source) at com.google.googlenav.map.Map.drawMap(Unknown Source) at com.google.android.maps.MapView.drawMap(MapView.java:1048) at com.google.android.maps.MapView.onDraw(MapView.java:486) at android.view.View.draw(View.java:6597) at android.view.ViewGroup.drawChild(ViewGroup.java:1533) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1260) at android.view.ViewGroup.drawChild(ViewGroup.java:1531) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1260) at android.view.View.draw(View.java:6600) at android.widget.FrameLayout.draw(FrameLayout.java:352) at android.view.ViewGroup.drawChild(ViewGroup.java:1533) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1260) at android.view.View.draw(View.java:6600) at android.widget.FrameLayout.draw(FrameLayout.java:352) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1884) at android.view.ViewRoot.draw(ViewRoot.java:1374) at android.view.ViewRoot.performTraversals(ViewRoot.java:1139) at android.view.ViewRoot.handleMessage(ViewRoot.java:1658) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4363) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620) at dalvik.system.NativeStart.main(Native Method) 
+4
source share
2 answers

Hopefully someone else comes up with a different answer to prove that I'm wrong, but in my personal experience with device-specific problems, catching exceptions often is the best you can do.

Edit your comment below: This is the point, and I ran into some new problems with specific devices using custom WebView code while expanding WebView.

There are a lot of people with much more experience than me, and I hope one of them comes in to give a more definitive answer or a less hacky solution, but you can always use android.os.Build.DEVICE , android.os.Build.MODEL if necessary android.os.Build.MODEL and / or android.os.Build.PRODUCT to determine if the application works on the Samsung Vibrant Galaxy S, and (via reflection) use the custom MapView class only if it exists.

+2
source

You may have made a mistake here, so change the code to the correct form or enter

  <uses-library android:name="com.google.android.maps" // in manifest under inside applicaiton tag android:required="true"/> //wrong usage of activity public class A extends Actvitiy { } //correct usage public class A extedns MapsActivity { //your all program... } 
0
source

All Articles