2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

java.lang.UnsatisfiedLinkError: dlopen failed: library "libc++_shared.so" not found エラー回避備忘録

Posted at

概要

java.lang.UnsatisfiedLinkError: dlopen failed: library "libc++_shared.so" not found

がruntimeのエラーとして吐き出される。

回避方法

app:build.gradle にて


apply plugin: 'com.android.application'

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId "com.example.test10"
        minSdkVersion 27
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        externalNativeBuild {
            cmake {
                cppFlags ""
            }
        }
    }

のところの


            cmake {
                cppFlags ""
            }

に追加して、


            cmake {
                arguments "-DCMAKE_BUILD_TYPE=Release" ,"-DANDROID_STL=c++_shared", '-DANDROID_TOOLCHAIN=clang'
                cppFlags ""
            }

とする。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?