简体   繁体   中英

How to troubleshoot this Google Map V2 logcat

Greeting! Thank you in advance for viewing my question. I want to run Google Map in emulator (Eclipse), but every time I run the AVD, it says that "application has stopped". What happen exactly? How can I troubleshoot it? I have searched for solutions, but all I found can't solve it. Here is copy of my logcat.

09-06 06:00:01.089: I/ProcessStatsService(380): Prepared write state in 73ms
09-06 06:00:15.499: E/SoundPool(380): error loading /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:15.499: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:15.499: E/SoundPool(380): error loading /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:15.499: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:15.509: E/SoundPool(380): error loading /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:15.509: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:15.509: E/SoundPool(380): error loading /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:15.509: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:15.509: E/SoundPool(380): error loading /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:15.519: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:15.519: E/SoundPool(380): error loading /system/media/audio/ui/KeypressStandard.ogg
09-06 06:00:15.519: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
09-06 06:00:15.519: E/SoundPool(380): error loading /system/media/audio/ui/KeypressSpacebar.ogg
09-06 06:00:15.519: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
09-06 06:00:15.519: E/SoundPool(380): error loading /system/media/audio/ui/KeypressDelete.ogg
09-06 06:00:15.519: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
09-06 06:00:15.519: E/SoundPool(380): error loading /system/media/audio/ui/KeypressReturn.ogg
09-06 06:00:15.519: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
09-06 06:00:15.519: E/SoundPool(380): error loading /system/media/audio/ui/KeypressInvalid.ogg
09-06 06:00:15.519: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/KeypressInvalid.ogg
09-06 06:00:15.519: W/AudioService(380): onLoadSoundEffects(), Error -1 while loading samples
09-06 06:00:15.539: I/ActivityManager(380): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=ca.sfu.cmpt276.bfraser/.MainActivity} from pid 620
09-06 06:00:15.609: D/gralloc(49): Registering a buffer in the process that created it. This may cause memory ordering problems.
09-06 06:00:15.609: E/libEGL(49): called unimplemented OpenGL ES API
09-06 06:00:15.609: E/libEGL(49): called unimplemented OpenGL ES API
09-06 06:00:15.619: E/libEGL(49): called unimplemented OpenGL ES API
09-06 06:00:15.619: E/libEGL(49): called unimplemented OpenGL ES API
09-06 06:00:15.619: E/SurfaceFlinger(49): glCheckFramebufferStatusOES error -889700262
09-06 06:00:15.619: E/SurfaceFlinger(49): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
09-06 06:00:15.619: E/libEGL(49): called unimplemented OpenGL ES API
09-06 06:00:15.619: E/libEGL(49): called unimplemented OpenGL ES API
09-06 06:00:15.619: W/WindowManager(380): Screenshot failure taking screenshot for (246x410) to layer 21005
09-06 06:00:15.729: I/Choreographer(620): Skipped 54 frames!  The application may be doing too much work on its main thread.
09-06 06:00:15.889: D/dalvikvm(1252): Not late-enabling CheckJNI (already on)
09-06 06:00:15.889: I/ActivityManager(380): Start proc ca.sfu.cmpt276.bfraser for activity ca.sfu.cmpt276.bfraser/.MainActivity: pid=1252 uid=10058 gids={50058, 3003, 1028, 1015}
09-06 06:00:16.689: D/AndroidRuntime(1252): Shutting down VM
09-06 06:00:16.689: W/dalvikvm(1252): threadid=1: thread exiting with uncaught exception (group=0xb3ab3ba8)
09-06 06:00:16.709: E/AndroidRuntime(1252): FATAL EXCEPTION: main
09-06 06:00:16.709: E/AndroidRuntime(1252): Process: ca.sfu.cmpt276.bfraser, PID: 1252
09-06 06:00:16.709: E/AndroidRuntime(1252): java.lang.RuntimeException: Unable to start activity ComponentInfo{ca.sfu.cmpt276.bfraser/ca.sfu.cmpt276.bfraser.MainActivity}: android.view.InflateException: Binary XML file line #22: Error inflating class fragment
09-06 06:00:16.709: E/AndroidRuntime(1252):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at android.app.ActivityThread.access$800(ActivityThread.java:135)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at android.os.Handler.dispatchMessage(Handler.java:102)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at android.os.Looper.loop(Looper.java:136)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at android.app.ActivityThread.main(ActivityThread.java:5017)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at java.lang.reflect.Method.invokeNative(Native Method)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at java.lang.reflect.Method.invoke(Method.java:515)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at dalvik.system.NativeStart.main(Native Method)
09-06 06:00:16.709: E/AndroidRuntime(1252): Caused by: android.view.InflateException: Binary XML file line #22: Error inflating class fragment
09-06 06:00:16.709: E/AndroidRuntime(1252):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at android.app.Activity.setContentView(Activity.java:1929)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at ca.sfu.cmpt276.bfraser.MainActivity.onCreate(MainActivity.java:24)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at android.app.Activity.performCreate(Activity.java:5231)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
09-06 06:00:16.709: E/AndroidRuntime(1252):     ... 11 more
09-06 06:00:16.709: E/AndroidRuntime(1252): Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected 5089000 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" />
09-06 06:00:16.709: E/AndroidRuntime(1252):     at com.google.android.gms.common.GooglePlayServicesUtil.A(Unknown Source)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at com.google.android.gms.maps.internal.u.I(Unknown Source)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at com.google.android.gms.maps.internal.u.H(Unknown Source)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at com.google.android.gms.maps.MapFragment$b.jz(Unknown Source)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at com.google.android.gms.maps.MapFragment$b.a(Unknown Source)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at com.google.android.gms.dynamic.a.a(Unknown Source)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at com.google.android.gms.dynamic.a.onInflate(Unknown Source)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at android.app.Activity.onCreateView(Activity.java:4785)
09-06 06:00:16.709: E/AndroidRuntime(1252):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:689)
09-06 06:00:16.709: E/AndroidRuntime(1252):     ... 21 more
09-06 06:00:16.719: W/ActivityManager(380):   Force finishing activity ca.sfu.cmpt276.bfraser/.MainActivity
09-06 06:00:17.029: I/WindowManager(380): Screenshot max retries 4 of Token{b4292878 ActivityRecord{b3f8dc40 u0 ca.sfu.cmpt276.bfraser/.MainActivity t5 f}} appWin=Window{b4418de8 u0 Starting ca.sfu.cmpt276.bfraser} drawState=4
09-06 06:00:17.029: W/WindowManager(380): Screenshot failure taking screenshot for (480x800) to layer 21010
09-06 06:00:17.559: W/ActivityManager(380): Activity pause timeout for ActivityRecord{b3f8dc40 u0 ca.sfu.cmpt276.bfraser/.MainActivity t5 f}
09-06 06:00:18.049: I/ActivityManager(380): Killing 1156:com.svox.pico/u0a40 (adj 15): empty for 5152s
09-06 06:00:18.619: E/SoundPool(380): error loading /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:18.619: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:18.619: E/SoundPool(380): error loading /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:18.619: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:18.619: E/SoundPool(380): error loading /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:18.619: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:18.639: E/SoundPool(380): error loading /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:18.669: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:18.669: E/SoundPool(380): error loading /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:18.669: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-06 06:00:18.669: E/SoundPool(380): error loading /system/media/audio/ui/KeypressStandard.ogg
09-06 06:00:18.669: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
09-06 06:00:18.669: E/SoundPool(380): error loading /system/media/audio/ui/KeypressSpacebar.ogg
09-06 06:00:18.669: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
09-06 06:00:18.679: E/SoundPool(380): error loading /system/media/audio/ui/KeypressDelete.ogg
09-06 06:00:18.679: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
09-06 06:00:18.679: E/SoundPool(380): error loading /system/media/audio/ui/KeypressReturn.ogg
09-06 06:00:18.679: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
09-06 06:00:18.679: E/SoundPool(380): error loading /system/media/audio/ui/KeypressInvalid.ogg
09-06 06:00:18.679: W/AudioService(380): Soundpool could not load file: /system/media/audio/ui/KeypressInvalid.ogg
09-06 06:00:18.679: W/AudioService(380): onLoadSoundEffects(), Error -1 while loading samples
09-06 06:00:18.739: I/Process(1252): Sending signal. PID: 1252 SIG: 9
09-06 06:00:18.769: I/ActivityManager(380): Process ca.sfu.cmpt276.bfraser (pid 1252) has died.
09-06 06:00:18.859: I/Choreographer(380): Skipped 32 frames!  The application may be doing too much work on its main thread.
09-06 06:00:19.309: W/InputMethodManagerService(380): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@b3d7fee0 attribute=null, token = android.os.BinderProxy@b42a02e0
: E/(): Device disconnected

your AndroidManifest file is not well configured

Insert element to include API key as a child of the

<meta-data android:name="com.google.android.maps.v2.API_KEY"
android:value="--- your API Key here ---"/>

Remember to replace value with your own API Key.

Please notice that you have to use debug API Key for your debug then later switch to release key

Add permission and uses-permission of MAPS_RECEIVE.

<permission 
android:name="com.example.yourpackage.MAPS_RECEIVE" 
android:protectionLevel="signature"></permission> <uses-permission 
android:name="com.example.androidmapsv2.permission.MAPS_RECEIVE"/>

Then Add uses-permission:

<uses-permission
android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

this optional

<uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION"/>

Specify uses-feature of OpenGL ES 2:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM