关于项目运行找不到类的错误

时间:2022-01-26 16:00:11

错误日志:

  • 09-30 14:25:57.397: E/AndroidRuntime(23014): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.catttsoft.zchat/com.catttsoft.zchat.test.ClientTestActivity}: java.lang.ClassNotFoundException: Didn’t find class “com.catttsoft.zchat.test.ClientTestActivity” on path: DexPathList[[zip file “/data/app/com.catttsoft.zchat-1.apk”],nativeLibraryDirectories=[/data/app-lib/com.catttsoft.zchat-1, /vendor/lib, /system/lib]]

解决办法:

1.删除bin再编译调试
2.项目Properties>Java Build Path>Order and export,调整library顺序,把其他library都提前试试