有没有办法运行 Android 模拟器上提供的示例地理围栏应用程序:http: //developer.android.com/training/location/geofencing.html
该应用程序在启动时关闭,我在 LogCat 上收到以下错误消息:
05-28 11:54:35.397: E/AndroidRuntime(847): FATAL EXCEPTION: main
05-28 11:54:35.397: E/AndroidRuntime(847): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.android.geofence/com.example.android.geofence.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.android.geofence.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.android.geofence-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.android.geofence-2, /system/lib]]
05-28 11:54:35.397: E/AndroidRuntime(847): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2137)
05-28 11:54:35.397: E/AndroidRuntime(847): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
05-28 11:54:35.397: E/AndroidRuntime(847): at android.app.ActivityThread.access$600(ActivityThread.java:141)
05-28 11:54:35.397: E/AndroidRuntime(847): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
05-28 11:54:35.397: E/AndroidRuntime(847): at android.os.Handler.dispatchMessage(Handler.java:99)
05-28 11:54:35.397: E/AndroidRuntime(847): at android.os.Looper.loop(Looper.java:137)
05-28 11:54:35.397: E/AndroidRuntime(847): at android.app.ActivityThread.main(ActivityThread.java:5103)
05-28 11:54:35.397: E/AndroidRuntime(847): at java.lang.reflect.Method.invokeNative(Native Method)
05-28 11:54:35.397: E/AndroidRuntime(847): at java.lang.reflect.Method.invoke(Method.java:525)
05-28 11:54:35.397: E/AndroidRuntime(847): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
05-28 11:54:35.397: E/AndroidRuntime(847): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
05-28 11:54:35.397: E/AndroidRuntime(847): at dalvik.system.NativeStart.main(Native Method)
05-28 11:54:35.397: E/AndroidRuntime(847): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.android.geofence.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.android.geofence-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.android.geofence-2, /system/lib]]
05-28 11:54:35.397: E/AndroidRuntime(847): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
05-28 11:54:35.397: E/AndroidRuntime(847): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
05-28 11:54:35.397: E/AndroidRuntime(847): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
05-28 11:54:35.397: E/AndroidRuntime(847): at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
05-28 11:54:35.397: E/AndroidRuntime(847): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2128)
05-28 11:54:35.397: E/AndroidRuntime(847): ... 11 more