Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.3.0 Release: App build failed for devices with Android API less than 26 #180

Closed
KirillBorodin opened this issue Mar 11, 2020 · 7 comments
Assignees
Labels
bug Something isn't working fixed
Milestone

Comments

@KirillBorodin
Copy link

Describe what happened
With com.datadoghq:dd-sdk-android:1.3.0 app build failed with next error:

image

Error: C:\Users\Kirill\.gradle\caches\transforms-2\files-2.1\d6c780953302a96e24317c3588620170\jetified-disruptor-3.4.2.jar:com/lmax/disruptor/util/ThreadHints.class, void com.lmax.disruptor.util.ThreadHints.onSpinWait(), MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26)

When I switched back to "com.datadoghq:dd-sdk-android:1.2.2" it works.

Steps to reproduce the issue:

  • Use implementation "com.datadoghq:dd-sdk-android:1.3.0" for your project
  • Create an emulator or connect a device with Android API less than 26
  • Try to "Run" the app

Describe what you expected:

  • The app should be worked

Additional context

  • Android OS version: Android 5.1.1
  • Device Model: Samsung SM-J320FN
  • Datadog SDK version: 1.3.0
  • Versions of any other relevant dependencies (OkHttp, …):
   implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
   implementation 'androidx.appcompat:appcompat:1.1.0'
   implementation 'androidx.core:core-ktx:1.3.0-alpha01'
   implementation 'com.google.android.material:material:1.1.0'
   implementation 'com.airbnb.android:lottie:3.0.0-beta1'
   implementation 'com.hbb20:ccp:2.2.4'
   implementation 'androidx.annotation:annotation:1.1.0'
   implementation 'com.yuyakaido.android:card-stack-view:2.3.4'
   implementation 'com.android.volley:volley:1.1.1'
   implementation 'com.squareup.moshi:moshi:1.9.2'
   implementation 'com.j256.ormlite:ormlite-android:4.46'
   implementation 'com.rvalerio:fgchecker:1.1.0'
   implementation 'com.google.code.gson:gson:2.8.6'
   implementation 'com.squareup.retrofit2:retrofit:2.5.0'
   implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
   implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0'
   implementation 'com.squareup.okhttp3:logging-interceptor:3.14.0'
   implementation 'com.squareup.okhttp3:okhttp:3.14.0'
   implementation 'io.reactivex.rxjava2:rxjava:2.2.11'
   implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
   implementation 'com.orhanobut:hawk:2.0.1'
   implementation 'com.scottyab:rootbeer-lib:0.0.7'
   implementation 'com.github.stfalcon:stfalcon-imageviewer:1.0.0'
   implementation 'com.squareup.picasso:picasso:2.71828'
   implementation 'com.facebook.android:facebook-login:5.1.1'
   implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
   implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.20.0"
   implementation "com.datadoghq:dd-sdk-android:1.2.2"
   implementation "androidx.biometric:biometric:1.0.1"
   implementation 'com.google.android.gms:play-services-ads-identifier:17.0.0'
   implementation "com.github.YarikSOffice:lingver:1.2.0"
   implementation 'com.google.firebase:firebase-analytics:17.2.2'
   implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta01'
   implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
  • Proguard configuration: empty

  • Gradle Plugins: 3.6.1

One notice: I didn't add this lines of code for build.gradle(:app):
{ exclude group: "com.google.guava", module: "listenablefuture" } as I am getting another error:
Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method com.datadoghq:dd-sdk-android:1.3.0() for arguments [build_51j9qrhttyw5g4zdn6hs7qdap$_run_closure3$_closure20@2bd02ded] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

So, my implementation of datadog looks next:
image

@KirillBorodin KirillBorodin added the bug Something isn't working label Mar 11, 2020
@xgouchet
Copy link
Collaborator

Thanks for submitting this issue, we'll look into that and provide a fix ASAP

@geoff-powell
Copy link

geoff-powell commented Mar 11, 2020

I am seeing this error as well with 1.4.0-beta1
Gradle Plugin: 3.6.1

@xgouchet
Copy link
Collaborator

@KirillBorodin there was an issue in the artifacts 1.3.0 which should be fixed now. Can you retry and let us know how it goes ?

@gpowell13 can you try adding the following excludes to your implementation :

kotlin

    implementation("com.datadoghq:dd-sdk-android:1.4.0-beta1") {
        exclude(group = "com.google.guava", module = "listenablefuture")
        exclude(group = "com.lmax", module = "disruptor")
    }

groovy

    implementation "com.datadoghq:dd-sdk-android:1.4.0-beta1"  {
        exclude group: "com.google.guava", module: "listenablefuture"
        exclude group: "com.lmax", module: "disruptor"
    }

@xgouchet xgouchet self-assigned this Mar 12, 2020
@KirillBorodin
Copy link
Author

@xgouchet Just retried:

  • updated again to 1.3.0
  • Clean Project
  • Rebuild Project
  • run the app in device with old Android OS

The issue is still present:
Error: C:\Users\MyUser\.gradle\caches\transforms-2\files-2.1\d6c780953302a96e24317c3588620170\jetified-disruptor-3.4.2.jar:com/lmax/disruptor/util/ThreadHints.class, void com.lmax.disruptor.util.ThreadHints.onSpinWait(), MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26)

@KirillBorodin
Copy link
Author

Thanks for the quick feedback by the way. Really appreciate it.

@xgouchet
Copy link
Collaborator

@KirillBorodin can you also clean your gradle cache and local maven repository to make sure it's indeed using the updated version of the library ?
Other wise, the following exclude should solve the issue :

 exclude group: "com.lmax", module: "disruptor"

@xgouchet
Copy link
Collaborator

This is fixed as of version 1.4.0-beta3

@xgouchet xgouchet added the fixed label May 10, 2021
@xgouchet xgouchet added this to the 1.4.0 milestone May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

3 participants