AppsFlyerSDK / appsflyer-flutter-plugin

Flutter Plugin for AppsFlyer SDK
MIT License
148 stars 116 forks source link

Unable to run android app with flutter run due to AppsflyerSdkPlugin.java errors #342

Open Yonkokilasi opened 2 weeks ago

Yonkokilasi commented 2 weeks ago

Describe the bug A clear and concise description of what the bug is. After upgrading to appsflyer_sdk: ^6.15.1 I can no longer run my flutter app. To Reproduce Steps to reproduce the behavior: Upgrade appsflyer_sdk to 6.15.1 Do flutter run in your terminal

Expected behavior A clear and concise description of what you expected to happen. I get a multitude of errors , Will post the first few here

bad class file: /Users/yonko/.gradle/caches/transforms-3/9dd547163521c1703fdc82b55e52e7bc/transformed/jetified-af-android-sdk-6.15.1-api.jar(/com/appsflyer/AFAdRevenueData.class)
    class file has wrong version 61.0, should be 55.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
/Users/yonko/.pub-cache/hosted/pub.dev/appsflyer_sdk-6.15.1/android/src/main/java/com/appsflyer/appsflyersdk/AppsflyerSdkPlugin.java:13: error: cannot access AFLogger
import com.appsflyer.AFLogger;

Screenshots If applicable, add screenshots to help explain your problem. Screenshot 2024-09-11 at 12 01 43

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here. output of flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.5, on macOS 14.5 23F79 darwin-arm64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.92.2)
[✓] VS Code (version 1.74.1)
[✓] VS Code (version 1.93.0)
[✓] Connected device (4 available)
[✓] Network resources
Yonkokilasi commented 2 weeks ago

Downgrading to 6.13.0+2 resolved the issue

pazlavi commented 2 weeks ago

Hi @Yonkokilasi, Your Java version is 11 when the minimum required version starts 6.15.1 is Java 17 Screenshot 2024-09-15 at 11 46 13

JosephusZhou commented 1 week ago

It seems that upgrading to Java17 is an irrational behavior and does not consider development compatibility.

pedroculque commented 1 week ago

I agree with @JosephusZhou , how does this make sense? Will you force all flutter projects to do this migration? I have the same problem

pazlavi commented 1 week ago

AGP v8 required Java 17 as shown here .