There's a problem whenever I build my project to my phone (Android 4.4.2).
I get the UnsatisfiedLinkError and it seems that the alljoyn library is not yet loaded.
The only thing that I've added is static { System.loadLibrary("alljoyn_java"); }
before the onCreate()
method of the Main activity.
Here is the build.gradle file for reference:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "secret.secret.secret"
minSdkVersion 19
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile files('src/main/java/jniLibs/alljoyn.jar')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
testCompile 'junit:junit:4.12'
}
Project Directory Android Studio version
Maybe I'm using the wrong android sdk. What could be the problem? Thanks for the help!