gpt4 book ai didi

android - 找不到从方法 glt.a 引用的类 'com.google.android.gms.location.internal.ParcelableGeofence

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:37:12 27 4
gpt4 key购买 nike

我有一个主页是 map 的应用。

不知道为什么我会收到此错误以及此错误 Could not find class 'gpr', referenced from method gps.a

我已经更新了 eclipse,所以我尝试使用新的 SHA1 指纹更改为 API key 。但这是行不通的。

我的应用程序是在您打开应用程序时显示当前位置。它刚刚进入整个 map ,但在 LOG cat 中我得到了这些错误。这是我的 Logcat

`07-08 12:54:39.897: I/Google Maps Android API(25749): Google Play services client version: 5077000

07-08 12:54:39.907: I/dalvikvm(25749): Could not find method guj.a, referenced from method gqi.a

07-08 12:54:39.907: W/dalvikvm(25749): VFY: unable to resolve static method 24936: Lguj;.a (Landroid/content/Context;)Lgri;

07-08 12:54:39.907: D/dalvikvm(25749): VFY: replacing opcode 0x71 at 0x0003

07-08 12:54:39.917: E/dalvikvm(25749): Could not find class 'gpr', referenced from method gps.a

07-08 12:54:39.917: W/dalvikvm(25749): VFY: unable to resolve new-instance 4090 (Lgpr;) in Lgps;

07-08 12:54:39.917: D/dalvikvm(25749): VFY: replacing opcode 0x22 at 0x0000

07-08 12:54:39.927: E/dalvikvm(25749): Could not find class 'gpr', referenced from method gps.a

07-08 12:54:39.927: W/dalvikvm(25749): VFY: unable to resolve new-instance 4090 (Lgpr;) in Lgps;

07-08 12:54:39.927: D/dalvikvm(25749): VFY: replacing opcode 0x22 at 0x0000

07-08 12:54:39.927: E/dalvikvm(25749): Could not find class 'gpr', referenced from method gps.a

07-08 12:54:39.927: W/dalvikvm(25749): VFY: unable to resolve new-instance 4090 (Lgpr;) in Lgps;

07-08 12:54:39.927: D/dalvikvm(25749): VFY: replacing opcode 0x22 at 0x0000

07-08 12:54:39.937: D/dalvikvm(25749): DexOpt: unable to opt direct call 0x5ea3 at 0x0a in Lgps;.a

07-08 12:54:39.937: D/dalvikvm(25749): DexOpt: unable to opt direct call 0x5ea3 at 0x0c in Lgps;.a

07-08 12:54:39.937: D/dalvikvm(25749): DexOpt: unable to opt direct call 0x5ea3 at 0x0a in Lgps;.a

07-08 12:54:39.957: I/Google Maps Android API(25749): Google Play services package version: 5084034

07-08 12:54:39.977: W/dalvikvm(25749): VFY: unable to resolve static field 20873 (t) in Lyp;

07-08 12:54:39.977: D/dalvikvm(25749): VFY: replacing opcode 0x62 at 0x000e
07-08 12:54:39.977: W/dalvikvm(25749): VFY: unable to resolve static field 20873 (t) in Lyp;

07-08 12:54:39.977: D/dalvikvm(25749): VFY: replacing opcode 0x62 at 0x000d

07-08 12:54:40.888: I/dalvikvm(25749): Failed resolving Lcom/google/android/gms/location/internal/ParcelableGeofence; interface 4023 'Lgln;'

07-08 12:54:40.888: W/dalvikvm(25749): Link of class 'Lcom/google/android/gms/location/internal/ParcelableGeofence;' failed

07-08 12:54:40.898: E/dalvikvm(25749): Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence', referenced from method glt.a

07-08 12:54:40.898: W/dalvikvm(25749): VFY: unable to resolve check-cast 2086 (Lcom/google/android/gms/location/internal/ParcelableGeofence;) in Lglt;

07-08 12:54:40.898: D/dalvikvm(25749): VFY: replacing opcode 0x1f at 0x0019

07-08 12:54:41.589: W/ActivityThread(25749): ClassLoader.loadClass: The class loader returned by Thread.getContextClassLoader() may fail for processes that host multiple applications. You should explicitly specify a context class loader. For example: Thread.setContextClassLoader(getClass().getClassLoader());`

我尝试用 Google 搜索它,但似乎还没有合适的解决方案,所以如果有人可以帮助我解决这个问题,那将会很有帮助。

最佳答案

我将向您展示我是如何解决您遇到的相同问题的。

首先,我清理了所有 sdk,然后再次下载了 Google Play 服务库。然后我删除了我电脑的 .android 文件夹并重新生成了我的 debug.keystore。

之后,我只需获取新的 SHA1 即可获得我的 Google Maps V2 Api key 。

更新我的 apikey 后,让我们看看我如何更改我的代码。

现在我在您的 xml 布局中使用 MapFragment 代替 MapView 的 fragment 。

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MapsActivity" >

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

</RelativeLayout>

并使用 FragmentManager 定位它:

    public class MapsActivity extends Activity
{
private GoogleMap map;

@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);

// Gets the MapView from the XML layout and creates it
map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
map.getUiSettings().setMyLocationButtonEnabled(false);
//map.setMyLocationEnabled(true);
map.setOnMapClickListener(this);
map.setOnMapLongClickListener(this);
try
{
MapsInitializer.initialize(MapsActivity.this);
}
catch (Exception e)
{
e.printStackTrace();
}
}

如果我的英语很糟糕,我希望这对您有所帮助,抱歉,问候

关于android - 找不到从方法 glt.a 引用的类 'com.google.android.gms.location.internal.ParcelableGeofence,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24626180/

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