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

Android |> build apk #39

Open
2 of 4 tasks
vovs03 opened this issue Apr 1, 2024 · 3 comments
Open
2 of 4 tasks

Android |> build apk #39

vovs03 opened this issue Apr 1, 2024 · 3 comments

Comments

@vovs03
Copy link
Owner

vovs03 commented Apr 1, 2024

Android |> build apk

2024-04-01 16:01

  • flutter build apk --split-per-abi
> **RED_ALERT** You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply
>
>Checking the license for package Android SDK Platform 34 in /usr/local/share/android-sdk/licenses
License for package Android SDK Platform 34 accepted.
Preparing "Install Android SDK Platform 34 (revision: 3)".
"Install Android SDK Platform 34 (revision: 3)" ready.
Installing Android SDK Platform 34 in /usr/local/share/android-sdk/platforms/android-34
"Install Android SDK Platform 34 (revision: 3)" complete.
"Install Android SDK Platform 34 (revision: 3)" finished.
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 1844 bytes (99.9% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
>
> **FAILURE:** Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processReleaseMainManifest'.
> Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @6aaddca7

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

> BUILD FAILED in 5m 38s
> Running Gradle task 'assembleRelease'...                          338,9s
> Gradle task assembleRelease failed with exit code 1

😸 Kotlin

  • brew install kotlin На будущее будет полезен, сейчас особой надобности не было*.
  • kotlinc -version
  • info: kotlinc-jvm 1.9.23 (JRE 1.8.0_231-b11)
    • В дальнейшем Котлин заменит Грууви

VSCode plugin | Gradle for Java


Gradle settings

https://docs.gradle.org/current/userguide/userguide.html

Gradle, Inc. предоставляет бесплатную услугу под названием Build Scan® это дает обширную информацию и идеи о ваших сборках. Вы можете просматривать сканы для выявления проблем или делиться ими для отладки помощи.

android/build.gradle

Удалить все buildscript блок от <app-src/android/build.gradle:

Удалил с 1й строки

buildscript {
    ext.kotlin_version = '1.9.22'
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:8.7.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}
@vovs03
Copy link
Owner Author

vovs03 commented Apr 1, 2024

После 2х часов попыток сбилдить

https://docs.flutter.dev/deployment/android#android-release-faq

@vovs03
Copy link
Owner Author

vovs03 commented Apr 1, 2024

Android | Sign App

  • CN=Vladimir Pavlychev, OU=MobileArt, O=OsArt, L="Serpukhov, Protvino", ST=Moscow, C=RU
  • Storing /Users/vovs03/upload-keystore.jks
Warning:
The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format 
using "keytool -importkeystore -srckeystore /Users/vovs03/upload-keystore.jks -destkeystore /Users/vovs03/upload-keystore.jks -deststoretype pkcs12".
  • keytool -importkeystore -srckeystore /Users/vovs03/upload-keystore.jks -destkeystore /Users/vovs03/upload-keystore.jks -deststoretype pkcs12

@vovs03
Copy link
Owner Author

vovs03 commented Apr 2, 2024

Article - flutter build android apk

2024-04-02 14:53

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

1 participant