在我意识到我的应用程序后,许多用户向我发送了ANR。所有ANR都在推出Android 5.0。
java.lang.VerifyError: Rejecting class de.berger.marcus.nwa_app.MapsActivity$2$1 because it failed compile-time verification (declaration of 'de.berger.marcus.nwa_app.MapsActivity$2$1' appears in /data/app/de.berger.marcus.nwa_app-1/base.apk)
at de.berger.marcus.nwa_app.MapsActivity$2.onMapReady(MapsActivity.java:181)
at com.google.android.gms.maps.MapView$zza$1.zza(Unknown Source)
at com.google.android.gms.maps.internal.zzo$zza.onTransact(Unknown Source)
at android.os.Binder.transact(Binder.java:380)
at com.google.android.gms.maps.internal.v$a$a.a(:com.google.android.gms.alldynamite:82)
at maps.ei.bu$6.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5832)
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:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
我在MapsActivity.java中的代码:181:
if (mapView != null) {
mapView.getMapAsync(new OnMapReadyCallback() {
@Override
public void onMapReady(final GoogleMap googleMap) {
showGPSPreview();
if (startGPS()==true) {googleMap.setMyLocationEnabled(true);}
if (startGPS()==false) {Log.d("GPS"," is OFF");}
googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(52.33101, 7.91667), 8));
googleMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() { // THIS IS LINE 181
@Override
public void onMapLoaded() {
CameraPosition cameraPosition = new CameraPosition.Builder()
.target(new LatLng(52.33101, 7.91667)) // Osnabrück als Zentrum
.zoom(9) // Zoomstufe
.bearing(0) // Ausrichtung nach Norden
.tilt(60) // 60 Grad Blickrichtung (Schräge)
.build(); // Los geht es
任何人都有我的后悔?
答案 0 :(得分:2)
好的,我找到了。 我在地图上有太多的Objekts。我删除一些后它的工作原理。 但它仅在Android 5.0.x上出现Crash。