Click here to Skip to main content
15,885,981 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I'm trying to integrate google map API in my Android app in Eclipse. But I get the following errors. There are many sources online, I tried them but its not working for me. In the emulator I get the error

unfortunately google play service has stopped


In console

[2014-07-09 15:12:27 - googleV2Map] Installing googleV2Map.apk...
[2014-07-09 15:13:16 - googleV2Map] Success!
[2014-07-09 15:13:16 - google-play-services_lib] Could not find google-play-services_lib.apk!


In LogCat

07-09 05:43:23.670: E/AndroidRuntime(815): FATAL EXCEPTION: main
07-09 05:43:23.670: E/AndroidRuntime(815): Process: com.example.googlev2map, PID: 815
07-09 05:43:23.670: E/AndroidRuntime(815): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.googlev2map/com.example.googlev2map.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.googlev2map.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.googlev2map-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.googlev2map-2, /system/lib]]
07-09 05:43:23.670: E/AndroidRuntime(815): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2121)
07-09 05:43:23.670: E/AndroidRuntime(815): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
07-09 05:43:23.670: E/AndroidRuntime(815): 	at android.app.ActivityThread.access$800(ActivityThread.java:135)
07-09 05:43:23.670: E/AndroidRuntime(815): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
07-09 05:43:23.670: E/AndroidRuntime(815): 	at android.os.Handler.dispatchMessage(Handler.java:102)
07-09 05:43:23.670: E/AndroidRuntime(815): 	at android.os.Looper.loop(Looper.java:136)
07-09 05:43:23.670: E/AndroidRuntime(815): 	at android.app.ActivityThread.main(ActivityThread.java:5017)
07-09 05:43:23.670: E/AndroidRuntime(815): 	at java.lang.reflect.Method.invokeNative(Native Method)
07-09 05:43:23.670: E/AndroidRuntime(815): 	at java.lang.reflect.Method.invoke(Method.java:515)
07-09 05:43:23.670: E/AndroidRuntime(815): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
07-09 05:43:23.670: E/AndroidRuntime(815): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
07-09 05:43:23.670: E/AndroidRuntime(815): 	at dalvik.system.NativeStart.main(Native Method)
07-09 05:43:23.670: E/AndroidRuntime(815): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.googlev2map.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.googlev2map-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.googlev2map-2, /system/lib]]
07-09 05:43:23.670: E/AndroidRuntime(815): 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
07-09 05:43:23.670: E/AndroidRuntime(815): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
07-09 05:43:23.670: E/AndroidRuntime(815): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
07-09 05:43:23.670: E/AndroidRuntime(815): 	at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
07-09 05:43:23.670: E/AndroidRuntime(815): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2112)
07-09 05:43:23.670: E/AndroidRuntime(815): 	... 11 more
Posted

1 solution

Step 1:
Import >> Existing code into Workspace >> Browse and select google_play_services_lib under sdk\extras\google\google_play_services\libproject folder

Step2:
Right click on your project > Properties > Android , Then under Library click add reference and
select google_play_services_lib

Unchecked is Library checkbox

Hope this will help :-)
 
Share this answer
 
Comments
R. Ganesh Kumar IT 9-Jul-14 9:38am    
Hi Hard_Rockz, I've done it already, also did it again now. But still the same issue occurs
Dilan Shaminda 9-Jul-14 11:40am    
hi Ganesh..do you have google_play_services_lib project in your Workspace or somewhere else?
R. Ganesh Kumar IT 10-Jul-14 1:29am    
I've created new workspace with name "workspace1"
The folders in the work space are

.metadata
google-play-services_lib
appcompat_v7
googleV2Map

and other project samples

The jar files in the project's libs folder "googleV2Map" are

appcompat_v7.jar
google-play-services_lib.jar
R. Ganesh Kumar IT 10-Jul-14 1:42am    
I get error in emulator
Unfortunately, google play service has stopped
Unfortunately, googleV2Map has stopped
Dilan Shaminda 10-Jul-14 8:05am    
ok..what is the exception your getting now?can you post your log file here?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900