I researched a lot for an answer of my question, but I didn't find anything. I can't add the .so library in my project.
I put the library in /app/src/main/jniLibs/arm64-v8a. The project will complile but on execution the following error comes.
Thank you for all answers.
Structure of directorys is here. arms64-v8a is the correct folder for my System.
build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.vtas_kassenterminal"
minSdkVersion 27
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude 'org/apache/http/version.properties'
exclude 'org/apache/http/nio/version.properties'
exclude 'org/apache/http/client/version.properties'
exclude 'org.apache.http.impl.nio.DefaultHttpServerIODispatch'
}
productFlavors {
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.squareup.okhttp3:okhttp:3.9.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation files('libs/acssmc-1.1.4.jar')
implementation 'org.jetbrains:annotations-java5:15.0'
implementation 'com.android.volley:volley:1.1.0'
}
Log:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.vtas_kassenterminal, PID: 10504
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.vtas_kassenterminal-zh4y12ECK4PCd-N-FXMp6A==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.vtas_kassenterminal-zh4y12ECK4PCd-N-FXMp6A==/lib/arm, /system/lib, /system/vendor/lib]]] couldn't find "libpcsclite.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:1011)
at java.lang.System.loadLibrary(System.java:1657)
at com.example.vtas_kassenterminal.JacspcscLoader.<clinit>(JacspcscLoader.java:280)
at com.example.vtas_kassenterminal.nfcTest.onCreate(nfcTest.java:135)
at android.app.Activity.performCreate(Activity.java:7258)
at android.app.Activity.performCreate(Activity.java:7249)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1222)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3059)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1724)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7000)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)