V2不工作的模拟器

V2不工作的模拟器

本文介绍了谷歌地图API V2不工作的模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作GOOGL地图API V2的机器人。

I am working on Googl Maps API v2 in android.

MapExample.java code

MapExample.java code

 public class MapExample extends FragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
}

main.xml中code

main.xml code

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

清单文件code

Manifest file code

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="17" />

<uses-feature android:glEsVersion="0x00020000"
                android:required="true" />

<permission
    android:name="com.example.android.mapexample.permission.MAPS_RECEIVE"
    android:protectionLevel="signature"/>

                                                                                                                                                                                                                                                                         <uses_permission                                                                                 android:name="com.example.android.mapexample.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission  android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />




<application
    android:allowBackup="true"
    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/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>


</application>

我运行此code在模拟器它显示了模拟器的消息,并在LogCat中警告

I am running this code in Emulator It shows a message in emulator and warning in LogCat

消息:谷歌播放服务,其中一些应用程序的依托,是不是你的人设置与制造商联系以确定按钮帮助supprted。   警告:谷歌播放签名无效。

Message: Google Play Service,which some of your applications rely on,is not supprted by your device.Please contact the manufacturer for assistance with ok button. Warning: Google Play Signature not valid.

当过点击该按钮,我得到的错误

when ever click on that button I get errors

03-02 13:17:30.746: D/AndroidRuntime(905): Shutting down VM
03-02 13:17:30.746: W/dalvikvm(905): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
03-02 13:17:30.776: E/AndroidRuntime(905): FATAL EXCEPTION: main
03-02 13:17:30.776: E/AndroidRuntime(905): java.lang.NullPointerException
03-02 13:17:30.776: E/AndroidRuntime(905):  at android.app.Instrumentation.execStartActivity(Instrumentation.java:1409)
03-02 13:17:30.776: E/AndroidRuntime(905):  at android.app.Activity.startActivityForResult(Activity.java:3351)
03-02 13:17:30.776: E/AndroidRuntime(905):  at android.app.Activity.startActivityForResult(Activity.java:3312)
03-02 13:17:30.776: E/AndroidRuntime(905):  at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:817)
03-02 13:17:30.776: E/AndroidRuntime(905):  at android.app.Activity.startActivity(Activity.java:3522)
03-02 13:17:30.776: E/AndroidRuntime(905):  at android.app.Activity.startActivity(Activity.java:3490)
03-02 13:17:30.776: E/AndroidRuntime(905):  at com.google.android.gms.internal.e$2.onClick(Unknown Source)
03-02 13:17:30.776: E/AndroidRuntime(905):  at android.view.View.performClick(View.java:4084)
03-02 13:17:30.776: E/AndroidRuntime(905):  at android.view.View$PerformClick.run(View.java:16966)
03-02 13:17:30.776: E/AndroidRuntime(905):  at android.os.Handler.handleCallback(Handler.java:615)
03-02 13:17:30.776: E/AndroidRuntime(905):  at android.os.Handler.dispatchMessage(Handler.java:92)
03-02 13:17:30.776: E/AndroidRuntime(905):  at android.os.Looper.loop(Looper.java:137)
03-02 13:17:30.776: E/AndroidRuntime(905):  at android.app.ActivityThread.main(ActivityThread.java:4745)
03-02 13:17:30.776: E/AndroidRuntime(905):  at java.lang.reflect.Method.invokeNative(Native Method)
03-02 13:17:30.776: E/AndroidRuntime(905):  at java.lang.reflect.Method.invoke(Method.java:511)
03-02 13:17:30.776: E/AndroidRuntime(905):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
03-02 13:17:30.776: E/AndroidRuntime(905):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
03-02 13:17:30.776: E/AndroidRuntime(905):  at dalvik.system.NativeStart.main(Native Method)

我该如何解决这个问题?

How can I fix this?

推荐答案

在该职位在这里堆栈溢出时的文件集2文件,我偶然发现之一:

On one of the post here on stack overflow I have stumbled upon a file set of 2 files:

com.android.vending.apk

com.google.android.gms.apk

下面是我救了我的自我链接:

here are the links I have saved for my self:

http://www.filedropper.com/comandroidvending-1

http://www.filedropper.com/comgoogleandroidgms-1

https://www.dropbox.com/s/u3blse4z3l2et96/com.google.android.gms-6413100ccfca460007fdc988b1363db8.apk

https://www.dropbox.com/s/8jiban3pq2cgkvo/com.android.vending-108b71f4793186b8fd1768a9cd19bbd5.apk

都试一下,我不记得哪一个是工作,而是一个当然不会。

try both i don't remember which one is working, but one certainly does.

你应该做的是创建一个AVD具有以下属性:

what you should do is to create an AVD with the following properties:

启动它,当它完成启动,打开命令提示符,然后前往文件夹被这两个文件位于并使用安装命令将它们安装到AVD,

start it, and when it has finished booting, open command prompt and head to the folderwere those two files are located and install them to the avd using the install command,

例如:

C:\ Users \用户下载\ ADB安装com.android.vending.apk

在安装有这两个文件,​​并收到了成功按摩器,重新启动模拟器并尝试运行映射在这个AVD应用程序,它应该现在的工作。

after you have install both files and received a Success massage, restart theemulator and try to run you map application in this AVD, it should work now.

更新:

这是被2我的工作站与屏幕截图所示的配置中使用的由我和工作中的文件,请尝试一下,告诉我你的想法。

This are the files that are used by me and work on 2 of my work stations with the configuration shown in the screen shot, please try them and tell me what you think.

http://www.mediafire.com/download.php?pxpjfkveemq29qk

http://www.mediafire.com/download.php?zn8wna5wf4ek5le

这篇关于谷歌地图API V2不工作的模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 20:54