Я использовал Android Studio для создания приложения, используя Java, Kotlin и C ++.
Вчера я обновил Android NDK с версии 20.1 до версии 21.0, а затем студия android сохраняет cra sh, если я подключаюсь к своему телефону android и запускаю.
Часть лога sh в Logcat, как показано ниже.
--------- beginning of crash
2020-01-17 15:46:15.737 13606-13606/com.blinkai.Video_2020_Debugging E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.blinkai.Video_2020_Debugging, PID: 13606
java.lang.UnsatisfiedLinkError: dlopen failed: library "libomp.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:1071)
at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
at java.lang.System.loadLibrary(System.java:1667)
at com.blinkai.blinkai.MainActivity.<clinit>(MainActivity.kt:395)
at java.lang.Class.newInstance(Native Method)
at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
at android.support.v4.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:43)
at android.app.Instrumentation.newActivity(Instrumentation.java:1251)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3328)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3594)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2146)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7762)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1047)
Код в MainActivity.kt: 395:
// Used to load the 'native-lib' library on application startup.
init {
System.loadLibrary("native-lib")
}
Большое спасибо за ваш помощь!