After upgrading to appsflyer_sdk: ^6.15.1 I can no longer run my flutter app on android.
Steps to reproduce the behavior:
- Upgrade appsflyer_sdk to 6.15.1
- Do flutter run in your terminal
Below is a snippet of the multitude of errors I am getting
<code>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.
/.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;
bad class file: /Users/yonko/.gradle/caches/transforms-3/9dd547163521c1703fdc82b55e52e7bc/transformed/jetified-af-android-sdk-6.15.1-api.jar(/com/appsflyer/AFLogger.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.
/.pub-cache/hosted/pub.dev/appsflyer_sdk-6.15.1/android/src/main/java/com/appsflyer/appsflyersdk/AppsflyerSdkPlugin.java:14: error: cannot access AppsFlyerConsent
import com.appsflyer.AppsFlyerConsent;
^
</code>
<code>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.
/.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;
bad class file: /Users/yonko/.gradle/caches/transforms-3/9dd547163521c1703fdc82b55e52e7bc/transformed/jetified-af-android-sdk-6.15.1-api.jar(/com/appsflyer/AFLogger.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.
/.pub-cache/hosted/pub.dev/appsflyer_sdk-6.15.1/android/src/main/java/com/appsflyer/appsflyersdk/AppsflyerSdkPlugin.java:14: error: cannot access AppsFlyerConsent
import com.appsflyer.AppsFlyerConsent;
^
</code>
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.
/.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;
bad class file: /Users/yonko/.gradle/caches/transforms-3/9dd547163521c1703fdc82b55e52e7bc/transformed/jetified-af-android-sdk-6.15.1-api.jar(/com/appsflyer/AFLogger.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.
/.pub-cache/hosted/pub.dev/appsflyer_sdk-6.15.1/android/src/main/java/com/appsflyer/appsflyersdk/AppsflyerSdkPlugin.java:14: error: cannot access AppsFlyerConsent
import com.appsflyer.AppsFlyerConsent;
^
Output of flutter doctor
<code>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
</code>
<code>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
</code>
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
I have updated my java version as this issue was experienced on our fastlane pipeline and upgrading java resolved that. But it did not resolve for my machine (macOS Sonoma 14.5).
I have also opened an issue on the Appsflyer GitHub thread
1
use 6.15.0
My Android App also use appsflyer, 6.15.1 has problems.
1