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

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

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<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

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<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

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật