Firebase_auth не может создать релиз APK при флаттере [firebase_auth: ^ 0.16.1] - PullRequest
0 голосов
/ 17 июня 2020

Опишите ошибку Привет, я работал над проектом, связанным с Firebase, и использовал последнюю версию firebase_auth: ^ 0.16.1. Я не могу сделать релизную сборку этого пакета. Следующая информация о моем флаттер-докторе и консоли ошибок.

Воспроизвести

Запустить apk --release

Ожидаемое поведение

    jerald@IN-81:~/Documents/myown/flutter-game/Flutter-Apps/Hangman$ flutter build apk --release
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
    To generate an app bundle, run:
        flutter build appbundle --target-platform android-arm,android-arm64,android-x64
        Learn more on: https://developer.android.com/guide/app-bundle
    To split the APKs per ABI, run:
        flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
        Learn more on:  https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split

FAILURE: Build failed with an exception.                                

* Where:                                                                
Build file '/home/jerald/Documents/myown/flutter-game/Flutter-Apps/Hangman/android/app/build.gradle' line: 46

* What went wrong:                                                      
A problem occurred evaluating project ':app'.                           
> Could not find method signingConfig() for arguments [build_c22a35jnh8wqwng2bpwid9s9i$_run_closure2$_closure7@2634cea7] on object of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension.

* 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 5s                                                      
Running Gradle task 'assembleRelease'...                                
Running Gradle task 'assembleRelease'... Done                       7.3s
Gradle task assembleRelease failed with exit code 1
jerald@IN-81:~/Documents/myown/flutter-game/Flutter-Apps/Hangman$ clear
jerald@IN-81:~/Documents/myown/flutter-game/Flutter-Apps/Hangman$ flutter build apk --release
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
    To generate an app bundle, run:
        flutter build appbundle --target-platform android-arm,android-arm64,android-x64
        Learn more on: https://developer.android.com/guide/app-bundle
    To split the APKs per ABI, run:
        flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
        Learn more on:  https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split

FAILURE: Build failed with an exception.                                

* Where:                                                                
Build file '/home/jerald/Documents/myown/flutter-game/Flutter-Apps/Hangman/android/app/build.gradle' line: 46

* What went wrong:                                                      
A problem occurred evaluating project ':app'.                           
> Could not find method signingConfig() for arguments [build_c22a35jnh8wqwng2bpwid9s9i$_run_closure2$_closure7@47335095] on object of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension.

* 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 0s                                                      
Running Gradle task 'assembleRelease'...                                
Running Gradle task 'assembleRelease'... Done                       1.1s
Gradle task assembleRelease failed with exit code 1
jerald@IN-81:~/Documents/myown/flutter-game/Flutter-Apps/Hangman$ clear
jerald@IN-81:~/Documents/myown/flutter-game/Flutter-Apps/Hangman$ flutter build apk --release
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
    To generate an app bundle, run:
        flutter build appbundle --target-platform android-arm,android-arm64,android-x64
        Learn more on: https://developer.android.com/guide/app-bundle
    To split the APKs per ABI, run:
        flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
        Learn more on:  https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split

FAILURE: Build failed with an exception.                                

* Where:                                                                
Build file '/home/jerald/Documents/myown/flutter-game/Flutter-Apps/Hangman/android/app/build.gradle' line: 46

* What went wrong:                                                      
A problem occurred evaluating project ':app'.                           
> Could not find method signingConfig() for arguments [build_c22a35jnh8wqwng2bpwid9s9i$_run_closure2$_closure7@7f548c1c] on object of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension.

* 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 0s                                                      
Running Gradle task 'assembleRelease'...                                
Running Gradle task 'assembleRelease'... Done                       1.0s
Gradle task assembleRelease failed with exit code 1
jerald@IN-81:~/Documents/myown/flutter-game/Flutter-Apps/Hangman$ clear
jerald@IN-81:~/Documents/myown/flutter-game/Flutter-Apps/Hangman$ flutter build apk --release
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
    To generate an app bundle, run:
        flutter build appbundle --target-platform android-arm,android-arm64,android-x64
        Learn more on: https://developer.android.com/guide/app-bundle
    To split the APKs per ABI, run:
        flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
        Learn more on:  https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
Removed unused resources: Binary resource data reduced from 309KB to 295KB: Removed 4%

FAILURE: Build failed with an exception.                                

* What went wrong:                                                      
Execution failed for task ':screenshot_and_share:verifyReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  Output:  /home/jerald/Documents/myown/flutter-game/Flutter-Apps/Hangman/build/screenshot_and_share/intermediates/res/merged/release/values/values.xml:186: error: resource android:attr/fontVariationSettings not found.
  /home/jerald/Documents/myown/flutter-game/Flutter-Apps/Hangman/build/screenshot_and_share/intermediates/res/merged/release/values/values.xml:187: error: resource android:attr/ttcIndex not found.
  error: failed linking references.                                     

Apps/Hangman/build/screenshot_and_share/intermediates/res/compiled/release/values-tr_values-tr.arsc.flat\
          --auto-add-overlay\                                           
          --non-final-ids\                                              
          -0\                                                           
          apk\                                                          
          --no-version-vectors                                          
  Daemon:  AAPT2 aapt2-3.2.1-4818971-linux Daemon #0                    

* 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 1m 55s                                                  
Running Gradle task 'assembleRelease'...                                
Running Gradle task 'assembleRelease'... Done                     117.5s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin firebase_auth...
Running Gradle task 'assembleAarRelease'...                             
Running Gradle task 'assembleAarRelease'... Done                    3.2s


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'firebase_auth'.
> The SDK directory '/home/jerald/Android/sdk' does not exist.

* 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 2s


The plugin firebase_auth could not be built due to the issue above.

флаттер Информация для врача

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.7, on Linux, locale en_IN)

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
[✓] Android Studio (version 3.6)
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.36.1)
[✓] Connected device (1 available)

! Doctor found issues in 1 category.

1 Ответ

0 голосов
/ 29 августа 2020

Выполните следующие действия:

  1. вы открываете флаттер-доктор и набираете трепет-доктор.

  2. доктор флаттер - Android лицензии.

  3. вы получаете два варианта y / N, вы вводите Y, вы нажимаете Enter.

  4. после того, как вы уйдете, хорошо? (y / N) напишите Y, вы нажимаете Enter.

  5. вы ставите Y на все, принимая все

  6. после принятия вы пишете в последний flutter doctor и дождитесь проверки обновлений зеленым.

  7. после всего, что вы закрываете flutter doctor и вводите свой pubspe c .yaml, добавьте последнюю версию firebase_auth: ^ 0.16.1 и запустите его.

Надеюсь, это очень поможет.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...