我正在为 android 开发谷歌地图导航。适用于 2.3 安卓版本。
我在谷歌上搜索找到了一些示例,但不确定是否显示所有错误。.所有都显示相同的错误..我在这里发布我最后一次尝试的错误
https://docs.google.com/uc?export=download&id=0B0MdROeR0jbvWVVNUV9jbk1OeEE
检查上面的代码并在 2.3.3 上进行测试...是否有效。
我的 logcat 信息是
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)