为此,我尝试将一个 android 项目用于另一个 android 项目
Properties--->Build Path-->Project--->Add(选择项目然后添加)-->Order and Export-->选择项目
但这会产生以下错误:
07-26 11:03:09.878: E/AndroidRuntime(573): FATAL EXCEPTION: main
07-26 11:03:09.878: E/AndroidRuntime(573): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.gps_test_prt/com.example.gps_test_prt.GPS_prt_main}: java.lang.ClassNotFoundException: com.example.gps_test_prt.GPS_prt_main
07-26 11:03:09.878: E/AndroidRuntime(573): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1879)
07-26 11:03:09.878: E/AndroidRuntime(573): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980)
07-26 11:03:09.878: E/AndroidRuntime(573): at android.app.ActivityThread.access$600(ActivityThread.java:122)
07-26 11:03:09.878: E/AndroidRuntime(573): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146)
07-26 11:03:09.878: E/AndroidRuntime(573): at android.os.Handler.dispatchMessage(Handler.java:99)
07-26 11:03:09.878: E/AndroidRuntime(573): at android.os.Looper.loop(Looper.java:137)
07-26 11:03:09.878: E/AndroidRuntime(573): at android.app.ActivityThread.main(ActivityThread.java:4340)
07-26 11:03:09.878: E/AndroidRuntime(573): at java.lang.reflect.Method.invokeNative(Native Method)
07-26 11:03:09.878: E/AndroidRuntime(573): at java.lang.reflect.Method.invoke(Method.java:511)
07-26 11:03:09.878: E/AndroidRuntime(573): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-26 11:03:09.878: E/AndroidRuntime(573): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-26 11:03:09.878: E/AndroidRuntime(573): at dalvik.system.NativeStart.main(Native Method)
07-26 11:03:09.878: E/AndroidRuntime(573): Caused by: java.lang.ClassNotFoundException: com.example.gps_test_prt.GPS_prt_main
07-26 11:03:09.878: E/AndroidRuntime(573): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
07-26 11:03:09.878: E/AndroidRuntime(573): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
07-26 11:03:09.878: E/AndroidRuntime(573): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
07-26 11:03:09.878: E/AndroidRuntime(573): at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
07-26 11:03:09.878: E/AndroidRuntime(573): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1870)
07-26 11:03:09.878: E/AndroidRuntime(573): ... 11 more
`
请帮忙。
谢谢