enter image description herei am working on google map navigation for android . for 2.3 android version .

i searched on google found some examples but not sure showing all errors . .all are showing same errors .. here i am posting the one last i tried

https://docs.google.com/uc?export=download&id=0B0MdROeR0jbvWVVNUV9jbk1OeEE

check the above code and test on 2.3.3 ... is that working or not.

my logcat information is

05-21 13:46:53.219: E/AndroidRuntime(557): FATAL EXCEPTION: main
05-21 13:46:53.219: E/AndroidRuntime(557): java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable
05-21 13:46:53.219: E/AndroidRuntime(557):  at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source)
05-21 13:46:53.219: E/AndroidRuntime(557):  at com.google.android.gms.maps.SupportMapFragment.onInflate(Unknown Source)
05-21 13:46:53.219: E/AndroidRuntime(557):  at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:279)
05-21 13:46:53.219: E/AndroidRuntime(557):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
05-21 13:46:53.219: E/AndroidRuntime(557):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
05-21 13:46:53.219: E/AndroidRuntime(557):  at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
05-21 13:46:53.219: E/AndroidRuntime(557):  at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
05-21 13:46:53.219: E/AndroidRuntime(557):  at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
05-21 13:46:53.219: E/AndroidRuntime(557):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
05-21 13:46:53.219: E/AndroidRuntime(557):  at android.app.Activity.setContentView(Activity.java:1657)
05-21 13:46:53.219: E/AndroidRuntime(557):  at app.akexorcist.googlemapsv2direction.Main.onCreate(Main.java:27)
05-21 13:46:53.219: E/AndroidRuntime(557):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-21 13:46:53.219: E/AndroidRuntime(557):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
05-21 13:46:53.219: E/AndroidRuntime(557):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
05-21 13:46:53.219: E/AndroidRuntime(557):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
05-21 13:46:53.219: E/AndroidRuntime(557):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
05-21 13:46:53.219: E/AndroidRuntime(557):  at android.os.Handler.dispatchMessage(Handler.java:99)
05-21 13:46:53.219: E/AndroidRuntime(557):  at android.os.Looper.loop(Looper.java:130)
05-21 13:46:53.219: E/AndroidRuntime(557):  at android.app.ActivityThread.main(ActivityThread.java:3683)
05-21 13:46:53.219: E/AndroidRuntime(557):  at java.lang.reflect.Method.invokeNative(Native Method)
05-21 13:46:53.219: E/AndroidRuntime(557):  at java.lang.reflect.Method.invoke(Method.java:507)
05-21 13:46:53.219: E/AndroidRuntime(557):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-21 13:46:53.219: E/AndroidRuntime(557):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-21 13:46:53.219: E/AndroidRuntime(557):  at dalvik.system.NativeStart.main(Native Method)
有帮助吗?

解决方案

it looks like you did not import google play services library because it is looking for a styleable resource

其他提示

Maybe you not add the google play services project into your Eclipse workspace and after need to add the dependency to Google Play Services into your project GoogleMapsV2Direction check this:

https://docs.google.com/document/pub?id=19nQzvKP-CVLd7_VrpwnHfl-AE9fjbJySowONZZtNHzw

for me this project works

You might not have imported required libraries for it.

Check this if you need help on how to import google-play-services to project,

Make sure that you haven't included any libraries as projects on the Java Build Path. That's taken care of in the Android tab now. If that doesn't work, try checking more choices in the Java Build Path -> Order and Export.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top