Java 不幸的是,该应用程序已停止在Android emulator上工作

Java 不幸的是,该应用程序已停止在Android emulator上工作,java,android,android-emulator,inflate-exception,Java,Android,Android Emulator,Inflate Exception,我已经试过杰克的指令了,但我还是会遇到这个错误 我在下面发布了新的日志 05-28 21:10:08.603: A/GmsApplication(3335): Unable to install secure provider, due to exception: 05-28 21:10:08.603: A/GmsApplication(3335): java.lang.SecurityException: attempting to read gservices without permiss

我已经试过杰克的指令了,但我还是会遇到这个错误

我在下面发布了新的日志

05-28 21:10:08.603: A/GmsApplication(3335): Unable to install secure provider, due to exception:
05-28 21:10:08.603: A/GmsApplication(3335): java.lang.SecurityException: attempting to read gservices without permission: Neither user 10007 nor current process has com.google.android.providers.gsf.permission.READ_GSERVICES.
05-28 21:10:08.603: A/GmsApplication(3335):     at android.app.ContextImpl.enforce(ContextImpl.java:1914)
05-28 21:10:08.603: A/GmsApplication(3335):     at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:1943)
05-28 21:10:08.603: A/GmsApplication(3335):     at android.content.ContextWrapper.enforceCallingOrSelfPermission(ContextWrapper.java:600)
05-28 21:10:08.603: A/GmsApplication(3335):     at com.google.android.gsf.e.c(SourceFile:107)
05-28 21:10:08.603: A/GmsApplication(3335):     at com.google.android.gms.common.security.ProviderInstallerImpl.insertProviderGated(SourceFile:90)
05-28 21:10:08.603: A/GmsApplication(3335):     at com.google.android.gms.common.app.GmsApplication.onCreate(SourceFile:85)
05-28 21:10:08.603: A/GmsApplication(3335):     at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012)
05-28 21:10:08.603: A/GmsApplication(3335):     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4556)
05-28 21:10:08.603: A/GmsApplication(3335):     at android.app.ActivityThread.access$1500(ActivityThread.java:151)
05-28 21:10:08.603: A/GmsApplication(3335):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
05-28 21:10:08.603: A/GmsApplication(3335):     at android.os.Handler.dispatchMessage(Handler.java:102)
05-28 21:10:08.603: A/GmsApplication(3335):     at android.os.Looper.loop(Looper.java:135)
05-28 21:10:08.603: A/GmsApplication(3335):     at android.app.ActivityThread.main(ActivityThread.java:5257)
05-28 21:10:08.603: A/GmsApplication(3335):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
05-28 21:10:08.603: A/GmsApplication(3335):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
05-28 21:10:08.940: E/AndroidRuntime(3335): FATAL EXCEPTION: main
05-28 21:10:08.940: E/AndroidRuntime(3335): Process: com.google.android.gms.persistent, PID: 3335
05-28 21:10:08.940: E/AndroidRuntime(3335): java.lang.RuntimeException: Unable to create service com.google.android.location.internal.GoogleLocationManagerService: java.lang.SecurityException: attempting to read gservices without permission: Neither user 10007 nor current process has com.google.android.providers.gsf.permission.READ_GSERVICES.
05-28 21:10:08.940: E/AndroidRuntime(3335):     at android.app.ActivityThread.handleCreateService(ActivityThread.java:2774)
05-28 21:10:08.940: E/AndroidRuntime(3335):     at android.app.ActivityThread.access$1800(ActivityThread.java:151)
05-28 21:10:08.940: E/AndroidRuntime(3335):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1386)
05-28 21:10:08.940: E/AndroidRuntime(3335):     at android.os.Handler.dispatchMessage(Handler.java:102)
05-28 21:10:08.940: E/AndroidRuntime(3335):     at android.os.Looper.loop(Looper.java:135)
05-28 21:10:08.940: E/AndroidRuntime(3335):     at android.app.ActivityThread.main(ActivityThread.java:5257)
05-28 21:10:08.940: E/AndroidRuntime(3335):     at java.lang.reflect.Method.invoke(Native Method)
05-28 21:10:08.940: E/AndroidRuntime(3335):     at java.lang.reflect.Method.invoke(Method.java:372)
05-28 21:10:08.940: E/AndroidRuntime(3335):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
05-28 21:10:08.940: E/AndroidRuntime(3335):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
05-28 21:10:08.940: E/AndroidRuntime(3335): Caused by: java.lang.SecurityException: attempting to read gservices without permission: Neither user 10007 nor current process has com.google.android.providers.gsf.permission.READ_GSERVICES.
05-28 21:10:08.940: E/AndroidRuntime(3335):     at android.app.ContextImpl.enforce(ContextImpl.java:1914)
05-28 21:10:08.940: E/AndroidRuntime(3335):     at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:1943)
05-28 21:10:08.940: E/AndroidRuntime(3335):     ... 9 more
05-28 21:10:16.483: E/libEGL(934): called unimplemented OpenGL ES API
05-28 21:10:16.483: E/SurfaceFlinger(934): glCheckFramebufferStatusOES error 1395899833
05-28 21:10:16.483: E/SurfaceFlinger(934): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot

异常详细信息在类似日志的日志中清楚地提到

 The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected 7327000 but found 0.  You must have the following declaration within the <application> element:     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
应用程序的AndroidManifest.xml中的元数据标记没有正确的值。预期为7327000,但找到0。元素中必须有以下声明:

根据上述详细信息更改清单
元数据
标记。

插入清单文件

 <activity
        android:name=".Yourclassname"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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




    <meta-data
        android:name="com.google.android.gms.version"
        android:value="7327000" />

您必须具备以下条件 AndroidManifest中的声明。Xml

<application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> 
元素:

日志猫中说,在发布布局文件中定义主要活动。发布marifest文件。您应该尝试发布一些有关错误实际发生原因的信息。有时很难从错误中辨别到底发生了什么。谢谢你的回复,但你能再帮我一次吗?我有新的错误,你必须用google api(google play services)创建emulator才能工作…或者你可以使用真实设备…我的emulator使用的是android api而不是google api,我会试试你的建议你可以发布java文件吗试着运行project real device这是我的java文件@user4847410@Jack问题是,,我没有真正的设备已经插入了,仍然会出现错误,就像我在上面发布的我用android API创建的emulator下载这个apk“com.android.vending.apk”和这个“com.google.android.gms.apk”使用cmd prom pat安装apk文件,然后在emulator上运行你的项目。点击链接