#flutter #dart #gradle #sha1
#flutter #dart #gradle #sha1
Вопрос:
Я хочу получить SHA1 с этим комментарием gradlew signingReport
в моей папке Android. Но я не могу.
моя версия gradle — 4.0.2. Я попытался удалить android.enableR8=true
из файла gradle.propertie, но ничего не изменилось!
Результатом gradlew signingReport --scan
> Configure project :app
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
> Configure project :file_picker
WARNING: The option setting 'android.enableR8=true' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
FAILURE: Build failed with an exception.
* What went wrong:
Task 'singingReport' not found in root project 'android'. Some candidates are: 'signingReport'.
* Try:
Run gradlew tasks to get a list of available tasks. 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 55s
Publishing a build scan to scans.gradle.com requires accepting the Gradle Terms of Service defined at https://gradle.com/terms-of-service. Do you accept these terms? [yes, no] y
Please enter 'yes' or 'no': yes
Gradle Terms of Service accepted.
Publishing build scan...
Результатом gradlew singingReport --scan
:
Initialized native services in: C:UsersAli Azad.gradlenative
The client will now receive all logging from the daemon (pid: 6348). The daemon log file: C:UsersAli Azad.gradledaemon6.1.1daemon-6348.out.log
Starting 7th build in daemon [uptime: 1 hrs 22 mins 57.548 secs, performance: 99%, GC rate: 0.00/s, heap usage: 9% of 1.1 GB]
Using 2 worker leases.
Starting Build
Settings evaluated using settings file 'D:projectsFlutter Projectsmobile-appandroidsettings.gradle'.
Projects loaded. Root project using build file 'D:projectsFlutter Projectsmobile-appandroidbuild.gradle'.
Included projects: [root project 'android', project ':app', project ':file_picker', project ':firebase_auth', project ':firebase_core', project ':flutter_plugin_android_lifecycle', project ':flutter_splash_screen', project ':google_maps_flutter', project ':google_sign_in', project ':image_cropper', project ':image_picker', project ':location', project ':shared_preferences', project ':webview_flutter']
> Configure project :
Evaluating root project 'android' using build file 'D:projectsFlutter Projectsmobile-appandroidbuild.gradle'.
> Configure project :app
Evaluating project ':app' using build file 'D:projectsFlutter Projectsmobile-appandroidappbuild.gradle'.
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
Creating configuration androidTestUtil
Configuring Java sources compilation with source level 1.8 and target level 1.8.
Configuring Java sources compilation with source level 1.8 and target level 1.8.
Configuring Java sources compilation with source level 1.8 and target level 1.8.
Configuring Java sources compilation with source level 1.8 and target level 1.8.
Configuring Java sources compilation with source level 1.8 and target level 1.8.
Configuring Java sources compilation with source level 1.8 and target level 1.8.
Configuring Java sources compilation with source level 1.8 and target level 1.8.
> Configure project :file_picker
Evaluating project ':file_picker' using build file 'D:Learningflutterflutter_sdk.pub-cachehostedpub.dartlang.orgfile_picker-2.0.13androidbuild.gradle'.
WARNING: The option setting 'android.enableR8=true' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
Creating configuration androidTestUtil
> Configure project :firebase_auth
Evaluating project ':firebase_auth' using build file 'D:Learningflutterflutter_sdk.pub-cachehostedpub.dartlang.orgfirebase_auth-0.18.3androidbuild.gradle'.
Creating configuration androidTestUtil
> Configure project :firebase_core
Evaluating project ':firebase_core' using build file 'D:Learningflutterflutter_sdk.pub-cachehostedpub.dartlang.orgfirebase_core-0.5.2androidbuild.gradle'.
Creating configuration androidTestUtil
> Configure project :flutter_plugin_android_lifecycle
Evaluating project ':flutter_plugin_android_lifecycle' using build file 'D:Learningflutterflutter_sdk.pub-cachehostedpub.dartlang.orgflutter_plugin_android_lifecycle-1.0.11androidbuild.gradle'.
Creating configuration androidTestUtil
> Configure project :flutter_splash_screen
Evaluating project ':flutter_splash_screen' using build file 'D:Learningflutterflutter_sdk.pub-cachehostedpub.dartlang.orgflutter_splash_screen-0.1.0androidbuild.gradle'.
Creating configuration androidTestUtil
> Configure project :google_maps_flutter
Evaluating project ':google_maps_flutter' using build file 'D:Learningflutterflutter_sdk.pub-cachehostedpub.dartlang.orggoogle_maps_flutter-1.0.6androidbuild.gradle'.
Creating configuration androidTestUtil
> Configure project :google_sign_in
Evaluating project ':google_sign_in' using build file 'D:Learningflutterflutter_sdk.pub-cachehostedpub.dartlang.orggoogle_sign_in-4.5.6androidbuild.gradle'.
Creating configuration androidTestUtil
> Configure project :image_cropper
Evaluating project ':image_cropper' using build file 'D:Learningflutterflutter_sdk.pub-cachehostedpub.dartlang.orgimage_cropper-1.3.1androidbuild.gradle'.
Creating configuration androidTestUtil
> Configure project :image_picker
Evaluating project ':image_picker' using build file 'D:Learningflutterflutter_sdk.pub-cachehostedpub.dartlang.orgimage_picker-0.6.7 14androidbuild.gradle'.
Creating configuration androidTestUtil
> Configure project :location
Evaluating project ':location' using build file 'D:Learningflutterflutter_sdk.pub-cachehostedpub.dartlang.orglocation-2.5.4androidbuild.gradle'.
Creating configuration androidTestUtil
> Configure project :shared_preferences
Evaluating project ':shared_preferences' using build file 'D:Learningflutterflutter_sdk.pub-cachehostedpub.dartlang.orgshared_preferences-0.5.12 4androidbuild.gradle'.
Creating configuration androidTestUtil
> Configure project :webview_flutter
Evaluating project ':webview_flutter' using build file 'D:Learningflutterflutter_sdk.pub-cachehostedpub.dartlang.orgwebview_flutter-1.0.7androidbuild.gradle'.
Creating configuration androidTestUtil
All projects evaluated.
Analytics other plugin to proto: Unknown plugin type FlutterPlugin expected enum FLUTTERPLUGIN
Configuring Java sources compilation with source level 1.7 and target level 1.7.
Configuring Java sources compilation with source level 1.7 and target level 1.7.
Configuring Java sources compilation with source level 1.7 and target level 1.7.
Configuring Java sources compilation with source level 1.7 and target level 1.7.
Configuring Java sources compilation with source level 1.7 and target level 1.7.
Configuring Java sources compilation with source level 1.7 and target level 1.7.
Configuring Java sources compilation with source level 1.7 and target level 1.7.
FAILURE: Build failed with an exception.
* What went wrong:
Task 'singingReport' not found in root project 'android'. Some candidates are: 'signingReport'.
* Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 10s
Ответ №1:
У вас опечатка в вашей команде. Этого gradlew signingReport
не должно быть gradlew singingReport
.
Комментарии:
1. Я печатаю
gradlew signingReport
. Это просто неправильно в вопросе.2. Боже мой, это сработало. В сообщениях об ошибках должно быть указано, что команда не найдена, почему она получает устаревшую ошибку.