flutter_smart_auth icon indicating copy to clipboard operation
flutter_smart_auth copied to clipboard

Compile error on Android15 (SDK 35)

Open YanhqZ opened this issue 1 year ago • 0 comments

Describe the bug I upgrade my compile SDK to 35,then raising a compile error for kotlin nullability when I run project.

To Reproduce Steps to reproduce the behavior:

  1. Upgrade app/build.gradle compile sdk to 35 like below:
android {
    namespace "..."
    compileSdk 35
    ndkVersion flutter.ndkVersion

    compileOptions {
        coreLibraryDesugaringEnabled true
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_1_8
    }

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    defaultConfig {
        applicationId "..."
        minSdkVersion 21
        targetSdkVersion 35
        versionCode flutterVersionCode
        versionName flutterVersionName
        multiDexEnabled = true
    }

    //...
}
  1. Run
  2. See error

e: file:///Users/yhq/.pub-cache/hosted/pub.dev/smart_auth-2.0.0/android/src/main/kotlin/fman/ge/smart_auth/AppSignatueHelper.kt:38:30 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type SigningInfo? e: file:///Users/yhq/.pub-cache/hosted/pub.dev/smart_auth-2.0.0/android/src/main/kotlin/fman/ge/smart_auth/AppSignatueHelper.kt:39:20 Type mismatch: inferred type is Array<(out) Signature!>? but Array<Signature> was expected

SmartAuth version: 2.0.0

Result of: flutter doctor --verbose

[!] Flutter (Channel [user-branch], 3.22.3, on macOS 14.4.1 23E224 darwin-arm64, locale zh-Hans-CN) ! Flutter version 3.22.3 on channel [user-branch] at /Users/yhq/Documents/Flutter_SDK_COPY/Flutter Currently on an unknown channel. Run `flutter channel` to switch to an official channel. If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install. ! Upstream repository unknown source is not the same as FLUTTER_GIT_URL [✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.3) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.3) [✓] Android Studio (version 2024.1) [!] Android Studio (version unknown) ✗ Unable to determine Android Studio version. [✓] IntelliJ IDEA Community Edition (version 2022.3.3) [✓] VS Code (version 1.77.3) [✓] Connected device (5 available) [✓] Network resources

Smartphone (please complete the following information):

  • Device: Samsung Galaxy S22
  • OS: Android 14

YanhqZ avatar Aug 28 '24 07:08 YanhqZ