flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
166.11k stars 27.43k forks source link

After changing minSdkVersion, build release apk no CERT.RSA and CERT.SF #58758

Closed xutingzhou closed 3 years ago

xutingzhou commented 4 years ago

Steps to Reproduce

Flutter 1.17.3 • channel stable • https://github.com/flutter/flutter.git Framework • revision b041144f83 (14 hours ago) • 2020-06-04 09:26:11 -0700 Engine • revision ee76268252 Tools • Dart 2.8.4

  1. create a new flutter project, noting to do, then exec 'flutter build apk', everything is ok 1 2
  2. only change minSdkVersion to 24 in '/android/app/build.gradle'
  3. exec 'flutter build apk', building is ok, but no CERT.RSA and CERT.SF in apk package 3 4 5

Expected results: how to build a release apk after changing minSdkVersion

iapicca commented 4 years ago

Hi @xutingzhou I see the behaviour you are describing,

screenshot ![image](https://user-images.githubusercontent.com/45637986/83873022-b46a5d00-a73b-11ea-8d5f-e15d6a453b0e.png)
doctor ```console [✓] Flutter (Channel stable, v1.17.3, on Mac OS X 10.15.5 19F101, locale en-GB) • Flutter version 1.17.3 at /Users/nevercode/development/flutter • Framework revision b041144f83 (19 hours ago), 2020-06-04 09:26:11 -0700 • Engine revision ee76268252 • Dart version 2.8.4 [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at /Users/nevercode/Library/Android/sdk • Platform android-29, build-tools 29.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 11.3.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 11.3.1, Build version 11C504 • CocoaPods version 1.9.0 [✓] Android Studio (version 3.6) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 45.1.1 • Dart plugin version 192.7761 • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211) [✓] VS Code • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.11.0 [!] Connected device ! No devices available ! Doctor found issues in 1 category. ```

this could be intentional, but honestly I cannot be sure.

Thank you for reporting this

jmagman commented 4 years ago

\cc @blasten @xster

succlz123 commented 4 years ago
signingConfigs {
    release {
            storeFile file("$project.rootDir/123.keystore")
            storePassword '123'
                keyAlias "123"
                keyPassword '123'
                v1SigningEnabled true
                v2SigningEnabled true
    } 
}

Try adding the signature flags in this way. @xutingzhou

There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.

darshankawar commented 3 years ago

@xutingzhou Check above comment from @succlz123. It seems starting from min sdk version 23+, apk without CERT.RSA and CERT.SF are acceptable. If you still want to have those certs, you may use v1SigningEnabled flag and set it to true.

You may read more about the flag here: https://google.github.io/android-gradle-dsl/3.4/com.android.build.gradle.internal.dsl.SigningConfig.html

I am going ahead and closing this. If you disagree, write in comments and I'll reopen it.

xutingzhou commented 3 years ago
signingConfigs {
  release {
          storeFile file("$project.rootDir/123.keystore")
          storePassword '123'
                keyAlias "123"
                keyPassword '123'
                v1SigningEnabled true
                v2SigningEnabled true
  } 
}

Try adding the signature flags in this way. @xutingzhou

There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.

signingConfigs {
  release {
          storeFile file("$project.rootDir/123.keystore")
          storePassword '123'
                keyAlias "123"
                keyPassword '123'
                v1SigningEnabled true
                v2SigningEnabled true
  } 
}

Try adding the signature flags in this way. @xutingzhou

There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.

原来是这么回事。我想升级一下版本怎么没了签名,国内市场都不给过。谢谢大佬

xutingzhou commented 3 years ago

@xutingzhou Check above comment from @succlz123. It seems starting from min sdk version 23+, apk without CERT.RSA and CERT.SF are acceptable. If you still want to have those certs, you may use v1SigningEnabled flag and set it to true.

You may read more about the flag here: https://google.github.io/android-gradle-dsl/3.4/com.android.build.gradle.internal.dsl.SigningConfig.html

I am going ahead and closing this. If you disagree, write in comments and I'll reopen it.

thanks

github-actions[bot] commented 3 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.