0

数か月前にフラッター アプリを作成して公開しましたが、Google admob を追加することにしました。アプリは正常にビルドされていますが、pubspec.yaml に google_mobile_ads 依存関係を追加してからアプリケーションを実行しようとすると、エラーがスローされます。

どうすればよいか教えてください

エラーメッセージ


* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\Users\acer\.gradle\caches\transforms-2\files-2.1\d63e259ee8b5da2243001c691b062585\play-services-ads-lite-20.1.0\AndroidManifest.xml:27:5-43:15: AAPT: error: unexpected element <queries> found in 
<manifest>.


* 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 48s
Running Gradle task 'assembleDebug'...                                  
Running Gradle task 'assembleDebug'... Done                        49.9s
The build failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetifier to solve the incompatibility.
Building plugin cloud_firestore...
Running Gradle task 'assembleAarRelease'...                             
Running Gradle task 'assembleAarRelease'... Done                    3.6s
√ Built build\app\outputs\repo.
Building plugin cloud_firestore_web...
Running Gradle task 'assembleAarRelease'...                             
Running Gradle task 'assembleAarRelease'... Done                 1,470ms


FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\acer\Documents\Flutter\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore_web-0.1.1+2\android\build.gradle' line: 22

* What went wrong:
A problem occurred evaluating root project 'cloud_firestore_web'.
> Failed to apply plugin [id 'com.android.library']
   > Minimum supported Gradle version is 5.4.1. Current version is 4.10.2. If using the gradle wrapper, try editing the distributionUrl in C:\Users\acer\.gradle\daemon\4.10.2\gradle\wrapper\gradle-wrapper.properties to gradle-5.4.1-all.zip

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


Exception: The plugin cloud_firestore_web could not be built due to the issue above.

私のpubspec.yaml


publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 1.0.4+5

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  paginate_firestore: ^0.1.1+1


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.3
  path_provider: ^1.6.8
  permission_handler: ^5.0.0+hotfix.6
  intl: ^0.16.1
  ext_storage: ^1.0.3
  flutter_downloader: ^1.4.4
  cloud_firestore: ^0.13.5
  font_awesome_flutter: ^8.5.0
  dots_indicator: ^1.1.0
  carousel_slider: ^1.3.1
  sliding_up_panel: ^0.3.6
  flutter_staggered_grid_view: ^0.3.0
  provider: ^4.3.1
  shared_preferences: ^0.5.4+3
  google_sign_in: ^4.4.6
  firebase_auth: ^0.16.0
  connectivity: ^0.4.5+3
  cached_network_image: ^2.2.0+1
  launch_review: ^2.0.0
  awesome_dialog: ^0.1.4
  onesignal_flutter: ^2.4.1
  firebase_analytics: ^5.0.2
  firebase_core: 0.4.5
  shimmer: ^1.1.1
  firebase_admob: ^0.9.3+2
  # facebook_audience_network: ^0.5.0
  fzwallpaper: ^1.0.2
  google_mobile_ads: ^0.13.0
  

dev_dependencies:
  flutter_test:
    sdk: flutter

  flutter_launcher_icons: "^0.7.3"
  flutter_native_splash: ^0.1.9


  
flutter_icons:
  android: "launcher_icon" 
  ios: true
  image_path: "assets/images/icon.png"


flutter_native_splash:
  image: assets/images/splash.png
  color: "ffffff"


flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  assets:
    
    - assets/images/icon.png
    - assets/images/splash.png
 
  fonts:



    - family: Poppins
      fonts:
        - asset: assets/fonts/Poppins-Light.ttf
          weight: 400
        - asset: assets/fonts/Poppins-Regular.ttf
          weight: 500
        - asset: assets/fonts/Poppins-Medium.ttf
          weight: 600
        - asset: assets/fonts/Poppins-SemiBold.ttf
          weight: 700
        - asset: assets/fonts/Poppins-Bold.ttf
          weight: 800
4

1 に答える 1