Blank Android app crash on dependency

Hi!

I’m trying to create a blank app in Android Studio and use Ground SDK.
When I debug it without Ground SDK unto a Samsung Galaxy S7(Android 8), it works great.
But when I add;

implementation 'com.parrot.drone.groundsdk:groundsdk:1.0.0'
runtimeOnly 'com.parrot.drone.groundsdk:arsdkengine:1.0.0'

in app-gradle, the application crashes at launch on the phone with the following error;

java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.kyle.dapcogg/com.kyle.dapcogg.MainActivity}: java.lang.ClassNotFoundException: Didn’t find class “com.kyle.dapcogg.MainActivity” on path: DexPathList[[zip file “/data/app/com.kyle.dapcogg-DcQHhZqqy0StE9B8VQa9Lw==/base.apk”],nativeLibraryDirectories=[/data/app/com.kyle.dapcogg-DcQHhZqqy0StE9B8VQa9Lw==/lib/arm64, /data/app/com.kyle.dapcogg-DcQHhZqqy0StE9B8VQa9Lw==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]

Any help would be deeply appreciated. It’s a college project with tight time frame.

Sincerely,
Carl Andersson

Hi,

Sorry, from the logs you provided, I fail to see any particular reason for this issue to occur.

Would it be feasible for you to provide a zip of your project so that I can take a deeper look?

Regards.

Hi!

Thanks for quick reply. It seems like new users can’t upload attachments, but I’ve shared it on Google Drive;

Thank you!

It seems you need to add the following block inside the ‘android’ block of your app/build.gradle file:

compileOptions {
    sourceCompatibility 1.8
    targetCompatibility 1.8
}

Seems to be working perfectly!
Thank you so much!

1 Like