Google Maps API Android-NullPointerException-setBoundsInParent

パトリック-GeolivesSA

Androidモバイルアプリケーション(Androidバージョン4.0以降と互換性があります)では、Google Maps APIV2を使用しています。

android.view.accessibility.AccessibilityNodeInfoクラスのsetBoundsInParentメソッドにNullPointerExceptionがある、ある種のデバイス(Androidバージョン4.3、4.4、および5.0)のユーザーからいくつかのバグレポートを受け取ります。

ユーザーが地図を移動またはズームしようとすると、アプリケーションがクラッシュします。

この問題は、一部のユーザー(デバイス)でのみ発生します。ほとんどのお客様はその問題を抱えていません。

この問題は、Google Maps APIのsetPaddingメソッドを使用してGoogleロゴを配置し、地図上で常にはっきりと見えるようにすることに起因しているようです

@Override
protected void onCreate(Bundle savedInstanceState)
{
                ... 
        // Initialize map
        ...     
        // Sets the padding for the map
                if(mMap!=null)
                {
                     mMap.setPadding(0, DPI.toPixels(100), 0, DPI.toPixels(100));
                }
                ...
}

setPaddingメソッドの呼び出しを削除すると、影響を受けるユーザーの問題は解決するようですが、このメソッドでGoogleロゴを配置する必要があるため、これは有効な解決策ではありません。

この問題を開発デバイスで再現することはできないため、この問題の本当の原因を見つけることは困難です。

バグの完全なスタックトレースは以下にあります。

誰かがアイデアを持っていますか?

よろしくお願いします。

宜しくお願いします。

Android4.3のスタックトレース-4.4

java.lang.NullPointerException
at android.view.accessibility.AccessibilityNodeInfo.setBoundsInParent(AccessibilityNodeInfo.java:1012)
at android.support.v4.view.a.k.c(SourceFile:819)
at android.support.v4.view.a.i.b(SourceFile:1850)
at com.google.maps.api.android.lib6.c.et.a(Unknown Source)
at android.support.v4.widget.ab.a(SourceFile:56)
at android.support.v4.widget.ac.a(SourceFile:717)
at android.support.v4.view.a.x.a(SourceFile:112)
at android.support.v4.view.a.ad.createAccessibilityNodeInfo(SourceFile:42)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchAccessibilityNodeInfos(AccessibilityInteractionController.java:724)
at android.view.AccessibilityInteractionController.findAccessibilityNodeInfoByAccessibilityIdUiThread(AccessibilityInteractionController.java:147)
at android.view.AccessibilityInteractionController.access$300(AccessibilityInteractionController.java:49)
at android.view.AccessibilityInteractionController$PrivateHandler.handleMessage(AccessibilityInteractionController.java:971)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5212)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
at dalvik.system.NativeStart.main(Native Method)

Android5.0のスタックトレース

java.lang.NullPointerException: Attempt to read from field 'int android.graphics.Rect.left' on a null object reference
at android.view.accessibility.AccessibilityNodeInfo.setBoundsInParent(AccessibilityNodeInfo.java:1316)
at android.support.v4.view.a.k.c(SourceFile:819)
at android.support.v4.view.a.i.b(SourceFile:1850)
at com.google.maps.api.android.lib6.c.et.a(Unknown Source)
at android.support.v4.widget.ab.a(SourceFile:56)
at android.support.v4.widget.ac.a(SourceFile:717)
at android.support.v4.view.a.x.a(SourceFile:112)
at android.support.v4.view.a.ad.createAccessibilityNodeInfo(SourceFile:42)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchAccessibilityNodeInfos(AccessibilityInteractionController.java:894)
at android.view.AccessibilityInteractionController.findAccessibilityNodeInfoByAccessibilityIdUiThread(AccessibilityInteractionController.java:155)
at android.view.AccessibilityInteractionController.access$400(AccessibilityInteractionController.java:53)
at android.view.AccessibilityInteractionController$PrivateHandler.handleMessage(AccessibilityInteractionController.java:1236)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
パトリック-GeolivesSA

バグはGoogleによって確認されています:http//code.google.com/p/gmaps-api-issues/issues/detail?id = 7619

宜しくお願いします。

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Google Maps API Android-NullPointerException-setBoundsInParent

分類Dev

MapView google maps NullPointerException?

分類Dev

Google Maps Android API v2

分類Dev

Android Google Maps Api Tileprovider reapeating x

分類Dev

Android alternative to iOS Google Maps API GMSGeometryOffset

分類Dev

Android: Google Maps API - Change position of maps toolbar

分類Dev

java.lang.NullPointerException:MapFragment.getMapAsync(com.google.android.gms.maps.OnMapReadyCallback)

分類Dev

Google Maps API DeletedApiProjectMapError

分類Dev

Google Maps API

分類Dev

Google Maps Directions API

分類Dev

Google Maps Autocompletion API

分類Dev

Google Maps Android API v2 Authorization failure

分類Dev

Authentication failed on the server. Google maps api. Android

分類Dev

Can't connect to Google Maps Api Android V2

分類Dev

Overlay an image on google maps android api v2

分類Dev

Google Maps Mobile SDK forBusinessとGoogleMaps Android API

分類Dev

Google Maps API + Google Maps Engine / My Maps

分類Dev

Google maps api geocoder is not working

分類Dev

Python Google Maps Geocoding API

分類Dev

Google Maps Embed Advanced API

分類Dev

Google Maps API key not used

分類Dev

Blazor:Google Maps JS API

分類Dev

Dynamically load Google Maps API

分類Dev

Google Maps Api、GeoJson、InfoWindow

分類Dev

Printing and lots of google maps (api)

分類Dev

API23 での Android Google Maps API セキュリティ例外

分類Dev

android google maps not loading the map

分類Dev

Android Google Maps SnapshotReadyCallback error

分類Dev

Android SDK Eclipse Google Maps