1

是否有人在尝试使用其 SDK 中的 Good Dynamics 示例应用程序时遇到此错误?

它让我很难过,因为我已经包含了所有必要的文件

01-24 06:28:21.463: E/AndroidRuntime(1436): FATAL EXCEPTION: main
01-24 06:28:21.463: E/AndroidRuntime(1436): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.good.gd.example.policy/com.good.gd.example.policy.ApplicationPolicy}: java.lang.ClassNotFoundException: Didn't find class "com.good.gd.example.policy.ApplicationPolicy" on path: DexPathList[[zip file "/data/app/com.good.gd.example.policy-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.good.gd.example.policy-2, /vendor/lib, /system/lib]]
01-24 06:28:21.463: E/AndroidRuntime(1436):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2137)
01-24 06:28:21.463: E/AndroidRuntime(1436):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
01-24 06:28:21.463: E/AndroidRuntime(1436):     at android.app.ActivityThread.access$600(ActivityThread.java:141)
01-24 06:28:21.463: E/AndroidRuntime(1436):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
01-24 06:28:21.463: E/AndroidRuntime(1436):     at android.os.Handler.dispatchMessage(Handler.java:99)
01-24 06:28:21.463: E/AndroidRuntime(1436):     at android.os.Looper.loop(Looper.java:137)
01-24 06:28:21.463: E/AndroidRuntime(1436):     at android.app.ActivityThread.main(ActivityThread.java:5103)
01-24 06:28:21.463: E/AndroidRuntime(1436):     at java.lang.reflect.Method.invokeNative(Native Method)
01-24 06:28:21.463: E/AndroidRuntime(1436):     at java.lang.reflect.Method.invoke(Method.java:525)
01-24 06:28:21.463: E/AndroidRuntime(1436):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
01-24 06:28:21.463: E/AndroidRuntime(1436):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
01-24 06:28:21.463: E/AndroidRuntime(1436):     at dalvik.system.NativeStart.main(Native Method)
01-24 06:28:21.463: E/AndroidRuntime(1436): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.good.gd.example.policy.ApplicationPolicy" on path: DexPathList[[zip file "/data/app/com.good.gd.example.policy-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.good.gd.example.policy-2, /vendor/lib, /system/lib]]
01-24 06:28:21.463: E/AndroidRuntime(1436):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
01-24 06:28:21.463: E/AndroidRuntime(1436):     at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
01-24 06:28:21.463: E/AndroidRuntime(1436):     at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
01-24 06:28:21.463: E/AndroidRuntime(1436):     at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
01-24 06:28:21.463: E/AndroidRuntime(1436):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2128)
01-24 06:28:21.463: E/AndroidRuntime(1436):     ... 11 more
4

1 回答 1

1

是的,首先您需要从 Android SDK 文件夹的 extras 文件夹中的好 sdk 文件夹中导入项目,然后在 gd 文件夹中...将项目导入工作区,然后当您尝试在 Good Technology 上运行任何应用程序时,创建对导入的依赖项项目。那么你不会得到例外。希望这对您有所帮助。

于 2014-05-17T08:36:25.600 回答