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

Problem with "java.time.Duration" on Applovin adapter #15

Open
sergip76 opened this issue Dec 31, 2024 · 4 comments
Open

Problem with "java.time.Duration" on Applovin adapter #15

sergip76 opened this issue Dec 31, 2024 · 4 comments

Comments

@sergip76
Copy link

It is not possible to use the SDK with API lower than 26 due to this problem:

com.applovin.impl.l0.collectGoogleAdvertisingInfo
java.lang.ClassNotFoundException - Didn't find class "java.time.Duration" on path: DexPathList

It seems that the Applovin adapter uses the java.time.Duration class introduced in API 26.

@Str4tos
Copy link
Member

Str4tos commented Jan 2, 2025

Hi @sergip76,
Thank you for creating the issue.

Unfortunately, this part of the code is not related to the CAS AppLovin Adapter, but rather to the AppLovin SDK, which we cannot modify. However, your issue seems to be related to the Java version. Although Android API 26 introduced the Duration class natively, this class is also available starting from Java 1.8.

Please make sure that your app is using at least Java 1.8. To do so, the following lines should be defined in your app-level build.gradle file:

android {
    // ...
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }
}

Let us know if you managed to resolve the issue.

@sergip76
Copy link
Author

sergip76 commented Jan 2, 2025

Hi @sergip76, Thank you for creating the issue.

Unfortunately, this part of the code is not related to the CAS AppLovin Adapter, but rather to the AppLovin SDK, which we cannot modify. However, your issue seems to be related to the Java version. Although Android API 26 introduced the Duration class natively, this class is also available starting from Java 1.8.

Please make sure that your app is using at least Java 1.8. To do so, the following lines should be defined in your app-level build.gradle file:

android {
    // ...
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }
}

Let us know if you managed to resolve the issue.

Yes. I was already using Java 1.8 with the code you wrote. It seems it doesn't solve the problem.

@balakumar-t
Copy link

@sergip76 - Same reported to Applovin, you may get fix soon.

AppLovin/AppLovin-MAX-Unity-Plugin#465

@sergip76
Copy link
Author

sergip76 commented Jan 2, 2025

@sergip76 - Same reported to Applovin, you may get fix soon.

AppLovin/AppLovin-MAX-Unity-Plugin#465

Thank you very much @balakumar-t. I hope Applovin will fix it quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants