gpt4 book ai didi

android - Google Play控制台仅在某些LG型号上报告了InflateException,而没有更多详细信息:如何更深入?

转载 作者:行者123 更新时间:2023-12-03 16:06:09 26 4
gpt4 key购买 nike

我的应用程序非常简单,并在主Activity上显示了Android Map。它可以在我拥有的几种手机和平板电脑(不是LG的手机)上完美运行。

Google Play控制台主要在某些LG设备上并且仅在Android 6.0上报告以下异常:

java.lang.RuntimeException: 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2434)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494)
at android.app.ActivityThread.access$900(ActivityThread.java:157)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5551)
at java.lang.reflect.Method.invoke(Native Method:0)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
Caused by: android.view.InflateException:
at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:401)
at android.app.Activity.setContentView(Activity.java:2171)
at com.mdc.nasoni.mdcNasoni.onCreate(mdcNasoni.java:125)
at android.app.Activity.performCreate(Activity.java:6272)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2387)

布局如下:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<TextView
android:id="@+id/log"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="#FF0000" />

<RelativeLayout
android:id="@+id/mapcontainer"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />

<Button
android:id="@+id/ButtonSave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:text="@string/button01"
android:visibility="gone" />

<Button
android:id="@+id/Button02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:visibility="gone" />

<Button
android:id="@+id/ButtonCancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:text="@string/button03"
android:visibility="gone" />

<Button
android:id="@+id/ButtonLayers"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:background="@drawable/ic_layers"
android:onClick="layersButtonClicked" />

<TextView
android:id="@+id/splashTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:background="@drawable/title_background"
android:drawableBottom="@drawable/icon"
android:padding="5dp"
android:text="@string/app_name" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@drawable/cross" />

<View
android:id="@+id/anchor"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_centerInParent="true" />

<ImageView
android:id="@+id/nasoneGreen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/anchor"
android:layout_centerHorizontal="true"
android:src="@drawable/nasone_green"
android:visibility="gone"
/>
</RelativeLayout>

</LinearLayout>

这是主Activity中的 onCreate():
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);

}

我无法在崩溃报告中看到导致它的原因的任何详细信息:关于如何进一步深入的任何建议?

谢谢,

最高

更新

似乎解决了替换
compile 'com.google.android.gms:play-services:+'


compile 'com.google.android.gms:play-services:9.6.1'

最佳答案

似乎解决了替换

compile 'com.google.android.gms:play-services:+'


compile 'com.google.android.gms:play-services:9.6.1'

关于android - Google Play控制台仅在某些LG型号上报告了InflateException,而没有更多详细信息:如何更深入?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44512888/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com