Android 8.0上的谷歌地图膨胀异常

问题描述 投票:0回答:1

我们正在开发一个使用谷歌地图sdk的应用程序。唯一的问题是应用程序在Android 8及更高版本上崩溃。所有其他版本没有任何问题。

传递介绍活动并获取权限后,在设置内容视图中的主要活动onCreate上会出现。

logcat错误消息是:

E/AndroidRuntime:     at android.content.res.TypedArray.getDrawableForDensity(TypedArray.java:953)
  at android.graphics.drawable.AdaptiveIconDrawable.updateLayerFromTypedArray(AdaptiveIconDrawable.java:516)
  at android.graphics.drawable.AdaptiveIconDrawable.inflateLayers(AdaptiveIconDrawable.java:480)
  at android.graphics.drawable.AdaptiveIconDrawable.inflate(AdaptiveIconDrawable.java:229)
  at android.graphics.drawable.DrawableInflater.inflateFromXmlForDensity(DrawableInflater.java:142)
  at android.graphics.drawable.Drawable.createFromXmlInnerForDensity(Drawable.java:1295)
  at android.graphics.drawable.Drawable.createFromXmlForDensity(Drawable.java:1254)
  at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:791)
  at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:621)
  at android.content.res.Resources.loadDrawable(Resources.java:886)
  at android.content.res.TypedArray.getDrawableForDensity(TypedArray.java:953)
  at android.graphics.drawable.AdaptiveIconDrawable.updateLayerFromTypedArray(AdaptiveIconDrawable.java:516)
  at android.graphics.drawable.AdaptiveIconDrawable.inflateLayers(AdaptiveIconDrawable.java:480)
  at android.graphics.drawable.AdaptiveIconDrawable.inflate(AdaptiveIconDrawable.java:229)
  at android.graphics.drawable.DrawableInflater.inflateFromXmlForDensity(DrawableInflater.java:142)
  at android.graphics.drawable.Drawable.createFromXmlInnerForDensity(Drawable.java:1295)
  at android.graphics.drawable.Drawable.createFromXmlForDensity(Drawable.java:1254)
  at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:791)
  at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:621)
  at android.content.res.Resources.loadDrawable(Resources.java:886)
  at android.content.res.TypedArray.getDrawableForDensity(TypedArray.java:953)
  at android.graphics.drawable.AdaptiveIconDrawable.updateLayerFromTypedArray(AdaptiveIconDrawable.java:516)
  at android.graphics.drawable.AdaptiveIconDrawable.inflateLayers(AdaptiveIconDrawable.java:480)
  at android.graphics.drawable.AdaptiveIconDrawable.inflate(AdaptiveIconDrawable.java:229)
  at android.graphics.drawable.DrawableInflater.inflateFromXmlForDensity(DrawableInflater.java:142)
  at android.graphics.drawable.Drawable.createFromXmlInnerForDensity(Drawable.java:1295)
  at android.graphics.drawable.Drawable.createFromXmlForDensity(Drawable.java:1254)
  at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:791)
  at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:621)
  at android.content.res.Resources.loadDrawable(Resources.java:886)
  at android.content.res.TypedArray.getDrawableForDensity(TypedArray.java:953)
  at android.graphics.drawable.AdaptiveIconDrawable.updateLayerFromTypedArray(AdaptiveIconDrawable.java:516)
  at android.graphics.drawable.AdaptiveIconDrawable.inflateLayers(AdaptiveIconDrawable.java:480)
  at android.graphics.drawable.AdaptiveIconDrawable.inflate(AdaptiveIconDrawable.java:229)
  at android.graphics.drawable.DrawableInflater.inflateFromXmlForDensity(DrawableInflater.java:142)
  at android.graphics.drawable.Drawable.createFromXmlInnerForDensity(Drawable.java:1295)
  at android.graphics.drawable.Drawable.createFromXmlForDensity(Drawable.java:1254)
  at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:791)
  at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:621)
  at android.content.res.Resources.loadDrawable(Resources.java:886)
  at android.content.res.TypedArray.getDrawableForDensity(TypedArray.java:953)
  at android.graphics.drawable.AdaptiveIconDrawable.updateLayerFromTypedArray(AdaptiveIconDrawable.java:516)
  at android.graphics.drawable.AdaptiveIconDrawable.inflateLayers(AdaptiveIconDrawable.java:480)
  at android.graphics.drawable.AdaptiveIconDrawable.inflate(AdaptiveIconDrawable.java:229)
  at android.graphics.drawable.DrawableInflater.inflateFromXmlForDensity(DrawableInflater.java:142)
java android google-maps-api-2 android-8.0-oreo
1个回答
0
投票

请检查App资源文件夹中的任何DPI。你必须处理它。

© www.soinside.com 2019 - 2024. All rights reserved.