Flutter Build Apk:失败:生成失败,发生异常 Firebase_Admob错误可能

问题描述

Flutter Build Apk:失败:生成失败,发生异常。 Firebase_Admob错误

该应用在Flutter run下运行良好。当我将软件包升级到最新版本时,就会发生这种情况。但是我有一些以前的软件包想修改代码。我不特别记得我用于firebase_admob软件包的版本

扑打医生

Flutter Doctor

pubspec.yaml

  cupertino_icons: ^0.1.3
  google_sign_in: ^4.5.1
  firebase_auth: ^0.16.1
  Flutter_signin_button: ^1.0.0
  google_fonts: ^1.1.0
  Flutter_cached_pdfview: ^0.2.3+3
  rFlutter_alert: ^1.1.0
  Flutter_spinkit: "^4.1.2"
  url_launcher: ^5.6.9
  getwidget: ^1.2.2
  firebase_admob: ^0.7.0
  firebase_core: ^0.4.5
  firebase_messaging: ^6.0.16

错误

C:\Data\suyashh\TEHkHANA\Suyash Roshan\NCERT APP\NCERT_STUDY_MATERIAL>Flutter build apk
Running "Flutter pub get" in NCERT_STUDY_MATERIAL...                0.9s
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-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-x64 --split-per-abi
        Learn more on:  https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
Plugin project :firebase_auth_web not found. Please update settings.gradle.
Plugin project :firebase_core_web not found. Please update settings.gradle.
Checking the license for package Android SDK Platform 27 in C:\Users\mrRobot\AppData\Local\Android\sdk\licenses
License for package Android SDK Platform 27 accepted.
Preparing "Install Android SDK Platform 27 (revision: 3)".
Running Gradle task 'assembleRelease'...
"Install Android SDK Platform 27 (revision: 3)" ready.
Installing Android SDK Platform 27 in C:\Users\mrRobot\AppData\Local\Android\sdk\platforms\android-27
"Install Android SDK Platform 27 (revision: 3)" complete.
"Install Android SDK Platform 27 (revision: 3)" finished.
Parameter format not correct -
Note: C:\Data\Flutter_windows_1.20.3-stable\Flutter\.pub-cache\hosted\pub.dartlang.org\firebase_admob-0.7.0\android\src\main\java\io\Flutter\plugins\firebaseadmob\AdRequestBuilderFactory.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build Failed with an exception.

* What went wrong:
Execution Failed for task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform libs.jar to match attributes {artifactType=processed-jar,org.gradle.libraryelements=jar,org.gradle.usage=java-runtime}.
      > Execution Failed for JetifyTransform: C:\Data\suyashh\TEHkHANA\Suyash Roshan\NCERT APP\NCERT_STUDY_MATERIAL\build\app\intermediates\Flutter\debug\libs.jar.
         > Failed to transform 'C:\Data\suyashh\TEHkHANA\Suyash Roshan\NCERT APP\NCERT_STUDY_MATERIAL\build\app\intermediates\Flutter\debug\libs.jar' using Jetifier. Reason: FileNotFoundException,message: C:\Data\suyashh\TEHkHANA\Suyash Roshan\NCERT APP\NCERT_STUDY_MATERIAL\build\app\intermediates\Flutter\debug\libs.jar (The system cannot find the path specified). (Run with --stacktrace for more details.)
           Please file a bug at http://issuetracker.google.com/issues/new?component=460323.

* 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 1s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done                     304.5s (!)
Gradle task assembleRelease Failed with exit code 1

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)