I got the same error the last few hours. I decided to change the assembly type as follows:
buildTypes { release { minifyEnabled false proguardFiles 'proguard-rules.pro' } }
After that, I deleted the entire imported line of ndk code. So my build.gradle for aRimple is
apply plugin: 'com.android.model.application' model { android { compileSdkVersion = 23 buildToolsVersion = "23.0.1" defaultConfig.with { applicationId = "org.artoolkit.ar.samples.ARSimple" minSdkVersion.apiLevel = 15 targetSdkVersion.apiLevel = 22 versionCode = 1 //Integer type incremented by 1 for every release, major or minor, to Google store versionName = "1.0" //Real fully qualified major and minor release description buildConfigFields.with { //Defines fields in the generated Java BuildConfig class, in this case, for create() { //default config, that can be accessed by Java code type = "int" //eg "if (1 == BuildConfig.VALUE) { /*do something*/}". name = "VALUE" //See: [app or lib]/build/generated/source/buildConfig/[package path]/ value = "1" // BuildConfig.java } } } } buildTypes { release { minifyEnabled false proguardFiles 'proguard-rules.pro' } } android.productFlavors { } } dependencies { //compile 'com.android.support:support-v4:23.0.1' //compile 'com.android.support:appcompat-v7:23.0.1' //Only required when the target device API level is greater than compile project(':aRBaseLib') } //the compile and target of the app being deployed to the device
Then I create and copy the entire .so library file to the jnilibs folder in the main application folder, as shown in the figure
fig
Then run yours. I do not know what this solution is for this. But errors go, and the project starts without errors. Tell me if you find any other solution for this. Thanks.
source share