我不知道为什么会出现这个错误。我没有更新任何东西。我从google api控制台生成了新密钥,但错误仍然存在。我想做这个例子 [使用Google Places API的Android SearchView小部件] [1]。
调试 - >水库>值 - > google_maps_api.xml
我还有一个具有相同结构的版本文件夹,我在两个文件中输入了相同的密钥。
日志:
3151-3151/com.example.onur I/Google Maps Android API﹕ Google Play services client version: 4242000
07-18 10:28:13.655 3151-3151/com.example.onur I/dalvikvm﹕ Could not find method guj.a, referenced from method gqi.a
07-18 10:28:13.655 3151-3151/com.example.onur W/dalvikvm﹕ VFY: unable to resolve static method 24936: Lguj;.a (Landroid/content/Context;)Lgri;
07-18 10:28:13.655 3151-3151/com.example.onur D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x0003
07-18 10:28:13.665 3151-3151/com.example.onur E/dalvikvm﹕ Could not find class 'gpr', referenced from method gps.a
07-18 10:28:13.665 3151-3151/com.example.onur W/dalvikvm﹕ VFY: unable to resolve new-instance 4090 (Lgpr;) in Lgps;
07-18 10:28:13.665 3151-3151/com.example.onur D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x0000
07-18 10:28:13.665 3151-3151/com.example.onur E/dalvikvm﹕ Could not find class 'gpr', referenced from method gps.a
07-18 10:28:13.665 3151-3151/com.example.onur W/dalvikvm﹕ VFY: unable to resolve new-instance 4090 (Lgpr;) in Lgps;
07-18 10:28:13.665 3151-3151/com.example.onur D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x0000
07-18 10:28:13.665 3151-3151/com.example.onur E/dalvikvm﹕ Could not find class 'gpr', referenced from method gps.a
07-18 10:28:13.665 3151-3151/com.example.onur W/dalvikvm﹕ VFY: unable to resolve new-instance 4090 (Lgpr;) in Lgps;
07-18 10:28:13.665 3151-3151/com.example.onur D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x0000
07-18 10:28:13.665 3151-3151/com.example.onur D/dalvikvm﹕ DexOpt: unable to opt direct call 0x5ea3 at 0x0a in Lgps;.a
07-18 10:28:13.665 3151-3151/com.example.onur D/dalvikvm﹕ DexOpt: unable to opt direct call 0x5ea3 at 0x0c in Lgps;.a
07-18 10:28:13.665 3151-3151/com.example.onur D/dalvikvm﹕ DexOpt: unable to opt direct call 0x5ea3 at 0x0a in Lgps;.a
07-18 10:28:13.685 3151-3151/com.example.onur I/Google Maps Android API﹕ Google Play services package version: 5084036
07-18 10:28:13.695 3151-3151/com.example.onur W/dalvikvm﹕ VFY: unable to resolve static field 20873 (t) in Lyp;
07-18 10:28:13.695 3151-3151/com.example.onur D/dalvikvm﹕ VFY: replacing opcode 0x62 at 0x000e
07-18 10:28:13.700 3151-3151/com.example.onur W/dalvikvm﹕ VFY: unable to resolve static field 20873 (t) in Lyp;
07-18 10:28:13.700 3151-3151/com.example.onur D/dalvikvm﹕ VFY: replacing opcode 0x62 at 0x000d
07-18 10:28:13.890 3151-3151/com.example.onur D/dalvikvm﹕ GC_FOR_ALLOC freed 502K, 15% free 9978K/11648K, paused 29ms, total 29ms
07-18 10:28:14.065 3151-3454/com.example.onur D/dalvikvm﹕ GC_FOR_ALLOC freed 313K, 14% free 10119K/11660K, paused 17ms, total 17ms
07-18 10:28:14.155 3151-3151/com.example.onur I/dalvikvm﹕ Failed resolving Lcom/google/android/gms/location/internal/ParcelableGeofence; interface 4023 'Lgln;'
07-18 10:28:14.155 3151-3151/com.example.onur W/dalvikvm﹕ Link of class 'Lcom/google/android/gms/location/internal/ParcelableGeofence;' failed
07-18 10:28:14.155 3151-3151/com.example.onur E/dalvikvm﹕ Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence', referenced from method glt.a
07-18 10:28:14.155 3151-3151/com.example.onur W/dalvikvm﹕ VFY: unable to resolve check-cast 2086 (Lcom/google/android/gms/location/internal/ParcelableGeofence;) in Lglt;
[1]: http://wptrafficanalyzer.in/blog/android-searchview-widget-with-google-places-api-using-actionbarsherlock-library/
[2]: http://i.stack.imgur.com/R8fGG.jpg
答案 0 :(得分:1)
我有一些解决方案:
这有用吗?让我知道。
答案 1 :(得分:0)
问题在于Api密钥或包名称... 你刚才经历过......
可能错误可能出现在清单文件中或谷歌控制台上......
答案 2 :(得分:-1)
你可以发布你的清单吗?当然是Sans API密钥。
您的日志与我最近遇到的问题看起来几乎相同,通过在清单中添加以下内容来解决此问题:
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
我正在研究一个正在访问地图的应用程序,然后突然停止了。我看不到任何指向失踪许可的东西;当我将清单与另一个使用map api v2的应用程序进行比较时,我才接受它。
我仍然感到困惑,为什么它之前没有它(谷歌说你需要地图的许可才能工作)。也许我曾经把它放在那里并且意外地删除了这条线,但无论是哪种方式都把它修好了。
来源:https://developers.google.com/maps/documentation/business/mobile/android/config