Androidruntime: Fatal Exception: Androidmapsapi-Zoomtablemanager

Android studio app crashing error : AndroidRuntime: FATAL EXCEPTION: main

First convert the String data to only numeric string using replaceAll and then parse the numeric string data like :-

Integer.parseInt(stringData.replaceAll(",","")); // this should avoid the crash !

But to get the list of category id u should use split by , like :-

String[] categoryIds = checkoutItemsList.get(i).getCustomersBasketProduct().getCategoryIDs().split(",");

Then convert the string array to int array

int[] intIds = Arrays.stream(categoryIds).mapToInt(Integer::parseInt).toArray();

AndroidRuntime: FATAL EXCEPTION: Nullpointerexception, Inflateexception

In the StickerView file:

  1. Remove the StickerView(Context context) constructor
  2. Put the initialization code also in the StickerView(Context context, AttributeSet attributeSet) constructor (creating a dedicated method is a good approach) and
  3. Change this(context, attributeSet, 0) to super(context, attributeSet)
public StickerView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
setup();
}

public StickerView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
setup();
}

private void setup() {
this.mOldDistance = 0.0f;
this.mOldRotation = 0.0f;
this.mCurrentMode = ActionMode.NONE;
this.mTouchSlop = 3;
Paint paint = new Paint();
this.mBorderPaint = paint;
paint.setAntiAlias(true);
this.mBorderPaint.setColor(-16777216);
this.mBorderPaint.setAlpha(128);
this.mSizeMatrix = new Matrix();
this.mDownMatrix = new Matrix();
this.mMoveMatrix = new Matrix();
this.mStickerRect = new RectF();
**//Below line #129 the compiler select BitmapStickerIcon**
this.mDeleteIcon = new BitmapStickerIcon(ContextCompat.getDrawable(getContext(), R.drawable.ic_close_white_18dp));
this.mZoomIcon = new BitmapStickerIcon(ContextCompat.getDrawable(getContext(), R.drawable.ic_scale_white_18dp));
}

Fatal Exception: java.lang.ArrayIndexOutOfBoundsException at com.google.maps.api.android.lib6.gmm6.vector.ct

It is problem with Google Maps SDK, not with your app. Recommended solution is to clean app data from Settings. Or app reinstall.

You can track Google fixing this issue here: https://issuetracker.google.com/issues/154855417



Related Topics



Leave a reply



Submit