近期做项目时,引用别人的一个库,完了之后项目就是无法正常运行起来,报错如下:
大概就是运行时异常,找不到启动的Activity
2021-07-19 17:28:26.115 19262-19282/cn.forestar E/MemoryLeakMonitorManager: MemoryLeakMonitor.jar is not exist!
2021-07-19 17:28:26.115 19262-19262/cn.forestar E/Minikin: Could not get cmap table size!
2021-07-19 17:28:26.130 19262-19262/cn.forestar E/AndroidRuntime: FATAL EXCEPTION: main
Process: cn.forestar, PID: 19262
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{cn.forestar/cn.forestar.activity.StartActivity}: java.lang.ClassNotFoundException: Didn't find class "cn.forestar.activity.StartActivity" on path: DexPathList[[zip file "/data/app/cn.forestar-OMq39vfUQ9RjqZX-8Lo2gQ==/base.apk"],nativeLibraryDirectories=[/data/app/cn.forestar.oaproject-OMq39vfUQ9RjqZX-8Lo2gQ==/lib/arm, /data/app/cn.forestar.oaproject-OMq39vfUQ9RjqZX-8Lo2gQ==/base.apk!/lib/armeabi, /system/lib, /vendor/lib, /product/lib, /preavs/lib]]
各种尝试办法无法解决,最终添加了以下内容,程序运行正常了,希望对遇到同样问题的朋友有所帮忙吧:
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}