Unact / yandex_mapkit

Flutter implementation of YandexMapkit
MIT License
132 stars 151 forks source link

Карты не отображаются на Андроиде в Release mode #361

Closed birimkulov951 closed 1 month ago

birimkulov951 commented 1 month ago

В debug mode все работает как надо.

birimkulov951 commented 1 month ago

`apply plugin: "com.android.application" apply plugin: "kotlin-android" apply plugin: "dev.flutter.flutter-gradle-plugin" apply plugin: 'com.google.gms.google-services'

android { namespace "com.example.flapp" compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
    jvmTarget = '1.8'
}

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

defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.flapp.app"
    minSdkVersion 21

    // You can update the following values to match your application needs.
    // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
    //minSdkVersion flutter.minSdkVersion
    targetSdkVersion 31
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
    //multiDexEnabled true
    ndk {
        abiFilters 'armeabi-v7a','arm64-v8a','x86_64'
    }

}

signingConfigs {
    release {
        keyAlias keystoreProperties['keyAlias']
        keyPassword keystoreProperties['keyPassword']
        storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
        storePassword keystoreProperties['storePassword']
    }
}

buildTypes {
    release {
        //minifyEnabled false
        signingConfig signingConfigs.release
    }
}

}

flutter { source '../..' }

dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.yandex.android:maps.mobile:4.5.1-full'

} `

birimkulov951 commented 1 month ago

[✓] Flutter (Channel stable, 3.19.5, on macOS 14.4.1 23E224 darwin-arm64, locale en-KG) • Flutter version 3.19.5 on channel stable at /Users/birimkulov951/development/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 300451adae (11 days ago), 2024-03-27 21:54:07 -0500 • Engine revision e76c956498 • Dart version 3.3.3 • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc2) • Android SDK at /Users/birimkulov951/Library/Android/sdk • Platform android-34, build-tools 33.0.0-rc2 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15C500b • CocoaPods version 1.15.2

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] IntelliJ IDEA Community Edition (version 2022.1.2) • IntelliJ at /Applications/IntelliJ IDEA CE.app • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin version 221.5787.37

[✓] Connected device (3 available) • iPhone(Akyl) (mobile) • 00008110-000559883E98401E • ios • iOS 17.3.1 21D61 • macOS (desktop) • macos • darwin-arm64 • macOS 14.4.1 23E224 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 123.0.6312.107

[✓] Network resources • All expected network resources are available.

• No issues found!

DCrow commented 1 month ago

Добрый день!

Какую версию библиотеки вы используете? Если обновлялись с 3.4.0, указывали ли в файле android/gradle.properties значение yandexMapkit.variant=full ?

birimkulov951 commented 1 month ago

Добрый день!

Использую версию - yandex_mapkit: ^4.0.0. yandexMapkit.variant=full - указан.

Странно, что в debug mode все работает, но в release нет отображения.

в чем же может быть проблема?

DCrow commented 1 month ago

Обновитесь до 4.0.1 там эта бага исправлена.