2014-09-10 82 views
-1

我是第一次使用Android Studio用户,试图从提供的示例中运行Google Map应用程序。 Android-Studio正在使用Java 8Gentoo Linux平台上运行。我按照如何添加Google Play services的方向,将定义添加到Gradle,据我所知它是没有Google Play服务支持的虚拟设备。我还加入了保护规则,错误总是一样的。构建规则和依赖项包含文档中的条目。它看起来应该起作用。Google地图API第一次

很明显,我缺少一些基本的东西。基本的HelloWorld工作正常,我磕磕绊绊在Google的安全性和它们被调用的机制上。查看文档,我看到对GoogleAPIClient的引用 - 在尝试连接之前,我必须设置客户端连接吗?有没有,也许这个过程是正确定义的示例代码,其所有部分?

工作室本身处于当前修订级别。从错误,是否有可能我错过了其他的东西,例如ActivityNotFound

的logcat的消息流

09-10 10:07:16.449 1006-1006/cx.ath.klatt.test1 E/AndroidRuntime﹕ FATAL EXCEPTION: main 
    android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=market://details?id=com.google.android.gms flg=0x80000 pkg=com.android.vending } 
      at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1622) 
      at android.app.Instrumentation.execStartActivity(Instrumentation.java:1417) 
      at android.app.Activity.startActivityForResult(Activity.java:3370) 
      at android.app.Activity.startActivityForResult(Activity.java:3331) 
      at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:840) 
      at android.app.Activity.startActivity(Activity.java:3566) 
      at android.app.Activity.startActivity(Activity.java:3534) 
      at com.google.android.gms.dynamic.a$5.onClick(Unknown Source) 
      at android.view.View.performClick(View.java:4204) 
      at android.view.View$PerformClick.run(View.java:17355) 
      at android.os.Handler.handleCallback(Handler.java:725) 
      at android.os.Handler.dispatchMessage(Handler.java:92) 
      at android.os.Looper.loop(Looper.java:137) 
      at android.app.ActivityThread.main(ActivityThread.java:5041) 
      at java.lang.reflect.Method.invokeNative(Native Method) 
      at java.lang.reflect.Method.invoke(Method.java:511) 
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 
      at dalvik.system.NativeStart.main(Native Method) 
09-10 10:07:18.929 1006-1006/cx.ath.klatt.test1 I/Process﹕ Sending signal. PID: 1006 SIG: 9 
09-10 10:07:47.989 1035-1035/cx.ath.klatt.test1 W/GooglePlayServicesUtil﹕ Google Play services is missing. 
+0

请张贴您的代码进行此活动。同样,你可以看到最后一行说“播放服务丢失”。 – 2014-09-10 16:11:48

回答

0

在其中安装时,谷歌发挥服务需要安装,需要是最新也是该设备。