2

I used the Wikitude SDK v4 and when i launch my Activity i get this error. My IDE is Android Studio 1.5 and targetSDK 22

Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "/data/data/xxxx/libarchitect.so" not found.

I have the wikitudesdk.jar in my app/libs folder and here is my gradle file:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
    applicationId "xxxx"
    minSdkVersion 11
    targetSdkVersion 23
    versionCode 2
    versionName "2"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

packagingOptions {
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/maven/commons-io/commons-io/pom.xml'
    exclude 'META-INF/maven/commons-io/commons-io/pom.properties'
    }
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:gridlayout-v7:23.1.1'
...

}

Best reguards

frenchdev20
  • 695
  • 2
  • 10
  • 18

4 Answers4

1

You can try System.load("data/data/yourpackagename/lib/soname.so") (using the real path to your .so file).

mastov
  • 2,942
  • 1
  • 16
  • 33
shumengma
  • 33
  • 6
0

try this in your build.gradle file

android {
    packagingOptions {
        exclude "lib/arm64-v8a/libarchitect.so"
    }
}
wilddev
  • 1,904
  • 2
  • 27
  • 45
  • Your code above doesn't work.The same error : `dlopen("/data/data/xxxx/libarchitect.so", RTLD_LAZY) failed: dlopen failed: library "/data/data/xxxx/libarchitect.so" not found` `Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "/data/data/xxxx/libarchitect.so" not found` – frenchdev20 Jan 22 '16 at 16:39
0

You actually use targetSdkVersion 23. Try targetSdkVersion 22. It may be the problem wit text relocations in .so for android 6.0

https://code.google.com/p/android-developer-preview/issues/detail?id=3028

wilddev
  • 1,904
  • 2
  • 27
  • 45
-4

I have same kind of error while using wikitude library. I Resolved it by reverting the project-level build.gradle classpath to

'com.android.tools.build:gradle:1.0.0' 

from

'com.android.tools.build:gradle:1.5.0' 

It also requires changing the Project level setting to use default gradle wrapper (Settings -> Build, Execution, Deployement -> Gradle)

Nick Cardoso
  • 20,807
  • 14
  • 73
  • 124
CrazyDev
  • 1
  • 1
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient [reputation](http://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](http://stackoverflow.com/help/privileges/comment). - [From Review](/review/low-quality-posts/11403042) – Nick Cardoso Feb 25 '16 at 16:37
  • I have same kind of error while using wikitude library; resolved it by changing the build.gradle(Project) to classpath 'com.android.tools.build:gradle:1.0.0'. – CrazyDev Feb 26 '16 at 12:05
  • I have same kind of error while using wikitude library;Resolved it by changing the build.gradle(Project) classpath to 'com.android.tools.build:gradle:1.0.0' from 'com.android.tools.build:gradle:1.5.0'. Also change the Project level setting to use default gradle wrapper(Settings -> Build, Execution, Deployement-> Gradle) – CrazyDev Feb 26 '16 at 12:11