是否可以在非 Google API 构建目标上运行 Google 地图(API V1 很好)?我有一个没有内置 google api 的特殊模拟器。
当我尝试将 maps.jar 添加到我的项目中的 libs 文件夹中时,MapActivity 可以引用我正在获取下面显示的堆栈跟踪。为此,我正在使用 Google Maps API V1 Maps.jar。
我尝试将清单设置为使用,也将其删除,两者都不起作用。
谢谢!
04-04 17:23:20.553: E/AndroidRuntime(12458): FATAL EXCEPTION: main
04-04 17:23:20.553: E/AndroidRuntime(12458): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.google.android.maps/com.google.android.maps.MapMainActivity}: java.lang.RuntimeException: stub
04-04 17:23:20.553: E/AndroidRuntime(12458): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
04-04 17:23:20.553: E/AndroidRuntime(12458): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
04-04 17:23:20.553: E/AndroidRuntime(12458): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
04-04 17:23:20.553: E/AndroidRuntime(12458): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
04-04 17:23:20.553: E/AndroidRuntime(12458): at android.os.Handler.dispatchMessage(Handler.java:99)
04-04 17:23:20.553: E/AndroidRuntime(12458): at android.os.Looper.loop(Looper.java:123)
04-04 17:23:20.553: E/AndroidRuntime(12458): at android.app.ActivityThread.main(ActivityThread.java:3683)
04-04 17:23:20.553: E/AndroidRuntime(12458): at java.lang.reflect.Method.invokeNative(Native Method)
04-04 17:23:20.553: E/AndroidRuntime(12458): at java.lang.reflect.Method.invoke(Method.java:507)
04-04 17:23:20.553: E/AndroidRuntime(12458): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
04-04 17:23:20.553: E/AndroidRuntime(12458): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
04-04 17:23:20.553: E/AndroidRuntime(12458): at dalvik.system.NativeStart.main(Native Method)
04-04 17:23:20.553: E/AndroidRuntime(12458): Caused by: java.lang.RuntimeException: stub
04-04 17:23:20.553: E/AndroidRuntime(12458): at com.google.android.maps.MapActivity.<init>(Unknown Source)
04-04 17:23:20.553: E/AndroidRuntime(12458): at com.google.android.maps.MapMainActivity. <init>(MapMainActivity.java:10)
04-04 17:23:20.553: E/AndroidRuntime(12458): at java.lang.Class.newInstanceImpl(Native Method)
04-04 17:23:20.553: E/AndroidRuntime(12458): at java.lang.Class.newInstance(Class.java:1409)
04-04 17:23:20.553: E/AndroidRuntime(12458): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
04-04 17:23:20.553: E/AndroidRuntime(12458): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)