Google Maps Android v2授权失败

Google Maps Android v2授权失败,第1张

概述我正在具有2.3.6的实际设备上测试示例google代码.我认为这可能是密钥问题,因此我通过Google的API控制台在不同的帐户上创建了不同的密钥.仍然存在相同的问题“GoogleMapsAndroidAPI-授权失败”.这是日志:12-0710:31:30.476:D/dalvikvm(17791):DexOpt:couldn'tfindfiel

我正在具有2.3.6的实际设备上测试示例Google代码.我认为这可能是密钥问题,因此我通过Google的API控制台在不同的帐户上创建了不同的密钥.仍然存在相同的问题“ Google Maps Android API -授权失败”.
这是日志:

12-07 10:31:30.476: D/dalvikvm(17791): DexOpt: Couldn't find fIEld LandroID/content/res/Configuration;.smallestScreenWIDthDp12-07 10:31:30.484: W/dalvikvm(17791): VFY: unable to resolve instance fIEld 2412-07 10:31:30.484: D/dalvikvm(17791): VFY: replacing opcode 0x52 at 0x001212-07 10:31:30.484: D/dalvikvm(17791): VFY: dead code 0x0014-0018 in Lcom/Google/androID/gms/common/GooglePlayServicesUtil;.b (LandroID/content/res/Resources;)Z12-07 10:31:30.718: D/dalvikvm(17791): GC_CONCURRENT freed 197K, 46% free 3063K/5639K, external 408K/517K, paused 3ms+4ms12-07 10:31:30.789: W/dalvikvm(17791): Unable to resolve superclass of Lmaps/a/du; (411)12-07 10:31:30.789: W/dalvikvm(17791): link of class 'Lmaps/a/du;' Failed12-07 10:31:30.789: W/dalvikvm(17791): Unable to resolve superclass of Lmaps/a/ej; (2363)12-07 10:31:30.789: W/dalvikvm(17791): link of class 'Lmaps/a/ej;' Failed12-07 10:31:30.789: W/dalvikvm(17791): Unable to resolve superclass of Lmaps/j/k; (2379)12-07 10:31:30.789: W/dalvikvm(17791): link of class 'Lmaps/j/k;' Failed12-07 10:31:30.789: E/dalvikvm(17791): Could not find class 'maps.j.k', referenced from method maps.y.ae.a12-07 10:31:30.789: W/dalvikvm(17791): VFY: unable to resolve new-instance 3571 (Lmaps/j/k;) in Lmaps/y/ae;12-07 10:31:30.789: D/dalvikvm(17791): VFY: replacing opcode 0x22 at 0x007d12-07 10:31:30.820: D/dalvikvm(17791): VFY: dead code 0x007f-008f in Lmaps/y/ae;.a (LandroID/vIEw/LayoutInflater;Lcom/Google/androID/gms/maps/GoogleMapOptions;Z)Lmaps/y/ae;12-07 10:31:31.281: D/dalvikvm(17791): GC_CONCURRENT freed 297K, 46% free 3222K/5959K, external 408K/517K, paused 3ms+4ms12-07 10:31:31.523: D/dalvikvm(17791): GC_EXTERNAL_ALLOC freed 227K, 45% free 3397K/6087K, external 431K/517K, paused 52ms12-07 10:31:31.648: I/System.out(17791): 012-07 10:31:31.734: D/dalvikvm(17791): GC_CONCURRENT freed 188K, 43% free 3531K/6151K, external 544K/1029K, paused 5ms+4ms12-07 10:31:32.125: D/libEGL(17791): loaded /system/lib/egl/libGLES_hgl.so12-07 10:31:32.132: D/BRCM_EGL(17791): eglCreateContext() context: 0xd7090, VC context 1, Thread 1781012-07 10:31:32.148: D/BRCM_EGL(17791): eglCreatewindowsurface() surface: 0xd70d0, VC surface: 1, Thread: 1781012-07 10:31:32.148: D/BRCM_EGL(17791): eglMakeCurrent(0xd7090, 0xd70d0, 0xd70d0) Thread: 1781012-07 10:31:32.859: E/Google Maps AndroID API(17791): Authorization failure.

这是我的清单:

<manifest xmlns:androID="http://schemas.androID.com/apk/res/androID"    package="com.smartapps4u.Googlemapslib"    androID:versionCode="1"    androID:versionname="1.0" >    <uses-sdk        androID:minSdkVersion="8"        androID:targetSdkVersion="16" />    <uses-feature androID:glEsversion="0x00020000" androID:required="true"/>    <permission         androID:name="com.smartapps4u.Googlemapslib.permission.MAPS_RECEIVE"         androID:protectionLevel="signature"/><uses-permission  androID:name="com.smartapps4u.Googlemapslib.permission.MAPS_RECEIVE"/><uses-permission androID:name="androID.permission.ACCESS_COARSE_LOCATION"/><uses-permission androID:name="androID.permission.ACCESS_FINE_LOCATION"/><uses-permission androID:name="androID.permission.INTERNET"/><uses-permission androID:name="androID.permission.WRITE_EXTERNAL_STORAGE"/><uses-permission androID:name="com.Google.androID.provIDers.gsf.permission.READ_GSERVICES"/><uses-library androID:name="com.Google.androID.maps" />    <application        androID:icon="@drawable/ic_launcher"        androID:label="@string/app_name"        androID:theme="@style/Apptheme" >    <Meta-data      androID:name="com.Google.androID.maps.v2.API_KEY"      androID:value="My API key"/>        <activity            androID:name=".MainActivity"            androID:label="@string/Title_activity_main" >            <intent-filter>                <action androID:name="androID.intent.action.MAIN" />                <category androID:name="androID.intent.category.LAUNCHER" />            </intent-filter>        </activity>    </application></manifest>

任何帮助,将不胜感激.

解决方法:

解决了这个问题,我这是一个非常愚蠢的错误,使用了错误的API密钥,将API密钥用于已签名的应用程序,将其替换为用于调试密钥库的API密钥,从而解决了问题.

总结

以上是内存溢出为你收集整理的Google Maps Android v2授权失败全部内容,希望文章能够帮你解决Google Maps Android v2授权失败所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1086154.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-27
下一篇 2022-05-27

发表评论

登录后才能评论

评论列表(0条)

保存