Api Gateway Android SDK NoClassDefFoundError - android

We're looking to implement our AWS API Gateway generated Android SDK in our app.
When we try to build our client class, we get the following error:
java.lang.NoClassDefFoundError: Failed resolution of:Lcom/amazonaws/util/json/DateDeserializer;
Here's how we create our client instance:
ApiClientFactory factory = new ApiClientFactory();
final CigarSocialClient client = factory.build(CigarSocialClient.class);
We have been searching for a solution but haven't found anything yet. The best solution seems to ditch the generated sdk and invoke our api gateway via web requests.
Any help is appreciated!
UPDATE:
We're using the following aws tutorial
Here is our build.gradle file for the app
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '24.0.1'
defaultConfig {
applicationId "com.example"
minSdkVersion 14
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile fileTree(include: ['*.jar'], dir: 'app/libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:design:24.2.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.amazonaws:aws-android-sdk-core:2.2.+'
compile 'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.2.+'
}
And here is the stack trace:
D/Error: ERR: stack=java.lang.NoClassDefFoundError: Failed resolution of: Lcom/amazonaws/util/json/DateDeserializer;
at com.amazonaws.mobileconnectors.apigateway.ApiClientHandler.(ApiClientHandler.java:59)
at com.amazonaws.mobileconnectors.apigateway.ApiClientFactory.getHandler(ApiClientFactory.java:145)
at com.amazonaws.mobileconnectors.apigateway.ApiClientFactory.build(ApiClientFactory.java:123)
at com.example.API.testApiGatwaySdk(API.java:125)
at com.example.ListFragment$override.onCreateView(ListFragment.java:60)
at com.example.ListFragment$override.access$dispatch(ListFragment.java)
at com.example.ListFragment.onCreateView(ListFragment.java:0)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:2080)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1108)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1290)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1272)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:2149)
at android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:201)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:600)
at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:178)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1256)
at android.app.Activity.performStart(Activity.java:6929)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3008)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4974)
at android.app.ActivityThread.-wrap21(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6688)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.amazonaws.util.json.DateDeserializer" on path: DexPathList[[dex file "/data/data/com.example/files/instant-run/dex/slice-support-annotations-24.2.0_f4e9ad562a860d98fa5881a52f2737573a46b23e-classes.dex", dex file "/data/data/com.example/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.example/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.example/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.example/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.example/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.example/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.example/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.example/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.example/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.example/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.example/files/instant-run/dex/slice-internal_impl-24.2.0_d08c5958e93c18231cddf69dc14d83b8ae6d3fa3-classes.dex", dex file "/data/data/com.example/files/instant-run/dex/slice-internal_impl-24.2.0_ce51fbf88aa3b5412a363fc449e8164899b38118-classes.dex", dex file "/data/data/com.example/files/instant-run/dex/slice-internal_impl-24.2.0_982f26845e74cf0a28b29b365

You are using a version of aws-android-sdk-core that is very old and not compatible with the altest clients generated by API gateway. Please update the sdk to the latest.

Related

NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzx

I am using
pub.devrel:easygoogle:0.2.5
and
com.google.firebase:firebase-core:16.0.1
I am making a simple notification app which sends notification from FCM.
I am following this but at runtime i am getting error
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzx;
at com.google.android.gms.measurement.internal.zzt.zzaU(Unknown Source)
at com.google.android.gms.measurement.AppMeasurement.getInstance(Unknown Source)
at com.google.firebase.analytics.connector.AnalyticsConnectorImpl.getInstance(Unknown Source)
at com.google.firebase.analytics.connector.internal.zzb.create(Unknown Source)
at com.google.firebase.components.zzh.zza(SourceFile:28)
at com.google.firebase.components.zzi.get(Unknown Source)
at com.google.firebase.components.zzh.get(SourceFile:39)
at com.google.firebase.components.ComponentContainer$$CC.get(Unknown Source)
at com.google.firebase.components.zzd.get(SourceFile)
at com.google.firebase.components.zzd.zza(SourceFile:68)
at com.google.firebase.FirebaseApp.zze(SourceFile:703)
at com.google.firebase.FirebaseApp.initializeApp(SourceFile:328)
at com.google.firebase.FirebaseApp.initializeApp(SourceFile:294)
at com.google.firebase.FirebaseApp.initializeApp(SourceFile:281)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(SourceFile:37)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1748)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1723)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(SourceFile:31)
at android.app.ActivityThread.installProvider(ActivityThread.java:5153)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4748)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4688)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzx" on path: DexPathList[[zip file "/data/app/com.apneareamein.autostartapp-1/base.apk", zip file "/data/app/com.apneareamein.autostartapp-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.apneareamein.autostartapp-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.apneareamein.autostartapp-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.apneareamein.autostartapp-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.apneareamein.autostartapp-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.apneareamein.autostartapp-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.apneareamein.autostartapp-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.apneareamein.autostartapp-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.apneareamein.autostartapp-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.apneareamein.autostartapp-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.apneareamein.autostartapp-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.apneareamein.autostartapp-1/lib/x86, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.google.android.gms.measurement.internal.zzt.zzaU(Unknown Source) 
... 30 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
gradle file -
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "com.myapp.autostart"
minSdkVersion 19
targetSdkVersion 27
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(dir: 'libs', include: ['*.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:27.+'
compile 'com.android.support:support-v4:27.+'
compile 'com.android.support.constraint:constraint-layout:1.0.1'
testCompile 'junit:junit:4.12'
compile 'pub.devrel:easygoogle:0.2.5'
compile 'com.google.firebase:firebase-core:16.0.1'
}
apply plugin: 'com.google.gms.google-services'
I have added build gradle file for more details. i extended EasyMessageService for Notifications.
if any more details is required please let me know.
How can it be resolved?
Thanks in advance.
I had also like this problem. I had an old version google and other services such as google service 1.5.0-beta2 Wanted to run on android 10 devices and gave me an error.
Didn't find class "com.google.android.gms.common.internal.zzx"
Then I updated all libraries to the latest version. Then worked.

Issue in making APK file in Android studio

I'm working on my very first android application which is almost complete now and ready to post on play store. But I'm unable to make the APK file :(
I'm using Android Studio 3.0.1
gradle-4.1
When I tried to make the APK file I got the error:
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
which was quickly resolved by adding multiDexEnabled true to
app/build.gradle
file. But after adding this I'm now getting another error:
Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
> java.io.IOException: Can't write [D:\My Data\Android\1stApplicationTest\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [C:\Users\USER_NAME\.gradle\caches\transforms-1\files-1.1\support-media-compat-26.0.2.aar\d7c069de85684fc017734fd1ac5ba973\jars\classes.jar(;;;;;;**.class)] (Duplicate zip entry [classes.jar:android/support/v4/media/VolumeProviderCompat.class]))
I'm unable to resolve this issue I tried number of solutions
updated all the jars version as per build/sdk version of the application
Removed duplicate/extra dependencies, if any
Removed Build folders from root and inside of app folder
In Android Studio File -> Invalidate Caches/Restart
Restarted Android studio with the clean build, also removed extra jars in .idea folder
Please advise if i need to remvoe something from the SDK: C:\Users\USER_NAME\AppData\Local\Android\sdk
Here is app/build.gradle file of my application
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId 'Shah.Jee'
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:26.0.2'
/*
compile files('libs/android-support-v4.jar')
compile 'com.android.support:support-v4:26.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:26.0.2'*/
compile 'commons-lang:commons-lang:2.6'
compile 'com.github.bumptech.glide:glide:4.2.0'
compile 'com.google.android.exoplayer:exoplayer:r2.4.0'
compile 'com.google.android.exoplayer:exoplayer-core:r2.4.0'
compile 'com.google.android.exoplayer:exoplayer-dash:r2.4.0'
compile 'com.google.android.exoplayer:exoplayer-hls:r2.4.0'
compile 'com.google.android.exoplayer:exoplayer-smoothstreaming:r2.4.0'
compile 'com.google.android.exoplayer:exoplayer-ui:r2.4.0'
testCompile 'junit:junit:4.12'
compile project(':picasso-2.5.2')
}
Need a quick advise if I'm missing something. Thanks in advance.

Include external libraries in your .aar file (a plugin for Unity)

I came across a problem while implementing an Android plugin for Unity based on EasyPermissions. The issue was due to
Caused by: java.lang.ClassNotFoundException: Didn't find class "pub.devrel.easypermissions.EasyPermissions$PermissionCallbacks"
as the relevant classes were not packed by Android Studio into my AAR file.
I tried various ways:
Just compile in Android Studio and hope the resulting AAR will be fine FAIL
Download an AAR from jCentral and add it to Unity - FAIL
So finally I unzipped the EasyPlugin AAR and took the classes.jar file thats inside and added this to Unity. This worked. Yet its quite a manual process.
What is the tinly little bit I need to add to my gradle file to get this done automatically?
I am using:
https://github.com/googlesamples/easypermissions
Unity 2017.1 (should not matter)
Android Studio 2.3.3
Gradle task used: build->assemble
My Gradle File:
apply plugin: 'com.android.library'
android {
compileSdkVersion 26
buildToolsVersion "27.0.0"
defaultConfig {
minSdkVersion 16
targetSdkVersion 26
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')
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:26.+'
testCompile 'junit:junit:4.12'
compile 'pub.devrel:easypermissions:1.0.1'
provided files('unity/classes.jar')
}
PS. There was a second issue when overriding UnityPlayerActivity but for that a clause provided instead of compile was the solution.
Check above comments.
If you use an external library its enough to add its AAR into Plugins/Android directory in Unity.
For some reason I added it in a way that went unnoticed by Unity and Unity was not adding it into resulting APK file.

: Unable to instantiate application and ClassNotFound while sharing apk

when i run the app from android studio it runs fine in simulator and device.
but when i share the debug / release version of apk it got crashed when user taps on a app icon.
following the error that i can see in logs
03-11 09:16:12.654 25384-25384/com.microtechnicianapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.microtechnicianapp, PID: 25384
java.lang.RuntimeException: Unable to instantiate application com.microtechnicianapp.App: java.lang.ClassNotFoundException: Didn't find class "com.microtechnicianapp.App" on path: DexPathList[[zip file "/data/app/com.microtechnicianapp-1/base.apk"],nativeLibraryDirectories=[/data/app/com.microtechnicianapp-1/lib/x86, /vendor/lib, /system/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:563)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4491)
at android.app.ActivityThread.access$1500(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.microtechnicianapp.App" on path: DexPathList[[zip file "/data/app/com.microtechnicianapp-1/base.apk"],nativeLibraryDirectories=[/data/app/com.microtechnicianapp-1/lib/x86, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.app.Instrumentation.newApplication(Instrumentation.java:979)
at android.app.LoadedApk.makeApplication(LoadedApk.java:558)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4491) 
at android.app.ActivityThread.access$1500(ActivityThread.java:144) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5221) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) 
Suppressed: java.lang.ClassNotFoundException: com.microtechnicianapp.App
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 13 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
have read lot of threads but nothing works for me since morning.
have tried lot of things in gradle
apply plugin: 'com.android.application' apply plugin: 'com.neenbedankt.android-apt' apply plugin: 'realm-android' android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.microtechnicianapp"
minSdkVersion 19
targetSdkVersion 24
versionCode 1
versionName "1.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
preDexLibraries false
} } repositories {
maven {
url "http://dl.bintray.com/lukaville/maven"
} }
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:design:25.0.0'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.bluelinelabs:logansquare:1.3.6'
compile 'com.github.aurae.retrofit2:converter-logansquare:1.4.1'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.google.firebase:firebase-messaging:9.8.0'
compile 'com.google.android.gms:play-services-maps:9.8.0'
compile 'com.google.android.gms:play-services-location:9.8.0'
compile 'com.github.gcacace:signature-pad:1.2.0'
compile 'com.github.davidpizarro:autolabelui:1.0.1'
compile 'com.nbsp:library:1.1'
compile 'com.journeyapps:zxing-android-embedded:3.2.0#aar'
compile 'com.google.zxing:core:3.2.1'
testCompile 'junit:junit:4.12'
apt 'com.bluelinelabs:logansquare-compiler:1.3.6'
compile 'com.google.android.gms:play-services-appindexing:9.8.0'
compile 'com.mikhaellopez:circularprogressbar:1.1.1'
compile 'com.android.support:multidex:1.0.0'
}
apply plugin: 'com.google.gms.google-services'
I am using android studio 2.3 hence gradle version is gradle-3.3-all.zip
I faced the same issue today, I have currently downgraded my gradle version and the generated debug apk works just fine, Feel like it might be an issue with the gradle version, will Update on this answer if i find with the actual issue.
But currently downgrading gradle from 2.3.0 to 2.2.0 seems to fix the issue.
I had the same crash with the debug apk of one of my apps. The release version (signed with release key) worked.
My app uses multidex.
I ended up disabling Instant Run in Android Studio (File -> Settings -> Build -> Instant Run) and after a rebuild the debug apk worked as well!
Found this solution here:
https://codentrick.com/cant-run-app-on-device-when-it-installed-from-debug-apk-file/

load armabi library or load .so files

I want to use the Android-pdfview library to show a pdf file within my application. I already compiled the library sucessfully, but when I want to Display the pdf following logcat Errors appear:
java.lang.UnsatisfiedLinkError: Couldn't load vudroid from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/de.gestureanywhere-1.apk"],nativeLibraryDirectories=[/data/app-lib/de.gestureanywhere-1, /vendor/lib, /system/lib]]]: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:358)
at java.lang.System.loadLibrary(System.java:526)
at de.gestureanywhere.Changelog_View.onCreate(Changelog_View.java:60)
at android.app.Activity.performCreate(Activity.java:5241)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2151)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2236)
at android.app.ActivityThread.access$800(ActivityThread.java:138)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1199)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5034)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611)
at dalvik.system.NativeStart.main(Native Method)
I have read a couple of hours and found out, that I have to compile the libvudroid.so or have to compile the armeabi library.
But all the how to, which I have read before, won't work.
So can you provide me please a step by step solution how to compile the library?
My gradle file Looks like this right now:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "21.1.2"
compileOptions.encoding = 'ISO-8859-1'
defaultConfig {
applicationId "de.gestureanywhere"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile ( 'proguard-android.txt' ), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree ( include: '*.jar', dir: 'libs' )
compile 'com.android.support:appcompat-v7:22.0.0'
compile files ( 'libs/android-pdfview-1.0.3.jar' )
}
Thanks a lot for helping.
The jar file does not contain the native libraries required for the pdfview library to work.
Instead of
compile files ( 'libs/android-pdfview-1.0.3.jar' )
use
compile 'com.joanzapata.pdfview:android-pdfview:1.0.4#aar'
to load the AAR package dependency which contains the java and native library.

Categories

Resources