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

Compile error on Android15 (SDK 35) #25

Open
YanhqZ opened this issue Aug 28, 2024 · 0 comments
Open

Compile error on Android15 (SDK 35) #25

YanhqZ opened this issue Aug 28, 2024 · 0 comments
Assignees

Comments

@YanhqZ
Copy link

YanhqZ commented Aug 28, 2024

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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants