扑火Firestore和androidx兼容性问题

时间:2020-10-26 07:10:51

标签: flutter gradle androidx github-actions

请帮助!

我正在使用GitHub操作运行自动构建,以构建应用程序捆绑包并将其发布到Play商店。 它在构建发布阶段失败。以下是我的操作文件:

这里是我的插件:

version: 99.99.99+99

environment:
  sdk: ">=2.3.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.

  cupertino_icons: ^0.1.2
  intro_views_flutter: "^2.8.1"
  fluttertoast: ^7.0.2
  toast: ^0.1.5
  intent: ^1.4.0
  flutter_tts: 1.0.0
  flutter_paystack: "1.0.4+1"
  shared_preferences: "^0.4.2"
  url_launcher: ^5.4.2
  webview_flutter: ^0.3.20
  # firebase_auth: ^0.18.1+1

  # Add the dependency for the Firebase Core Flutter SDK
  firebase_core: ^0.4.0+9
  cloud_firestore: ^0.12.0+5
  firebase_auth: ^0.15.3
  google_sign_in:
    ^4.5.3

GITHUB行动跑步者

- run: flutter pub get
      # - run: flutter test
      - run: flutter build apk --release --split-per-abi
      - run: flutter build appbundle
      - name: Create a Release in GitHub
        uses: ncipollo/release-action@v1
        with:
          artifacts: "build/app/outputs/apk/release/*.apk,build/app/outputs/bundle/release/app-release.aab"
          token: ${{ secrets.GH_TOKEN }}
          tag: ${{ steps.version.outputs.content }}
          commit: ${{ github.sha }}
      - name: Upload app bundle
        uses: actions/upload-artifact@v2
        with:
          name: appbundle
          path: build/app/outputs/bundle/release/app-release.aab
  release:
    name: Release app to internal track
    needs: [build]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Get appbundle from artifacts
        uses: actions/download-artifact@v2
        with:
          name: appbundle
      - name: Release app to internal track
        uses: r0adkll/upload-google-play@v1
        with:
          serviceAccountJsonPlainText: ${{ secrets.PLAYSTORE_ACCOUNT_KEY }}
          packageName: com.philencripted.earlyread
          releaseFile: app-release.aab
          track: internal
          whatsNewDirectory: distribution/whatsnew

Run flutter build apk --release --split-per-abi

还有下面的错误

Running Gradle task 'assembleRelease'...

warning: [options] source value 7 is obsolete and will be removed in a future release

warning: [options] target value 7 is obsolete and will be removed in a future release

warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings




warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings




warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings

warning: [options] source value 7 is obsolete and will be removed in a future release

warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.







Note: /opt/hostedtoolcache/flutter/1.22.2-stable/x64/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.11/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /opt/hostedtoolcache/flutter/1.22.2-stable/x64/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.11/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 warnings

warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release



warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings
warning: [options] source value 7 is obsolete and will be removed in a future release

warning: [options] target value 7 is obsolete and will be removed in a future release

warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.

3 warnings


warning: [options] source value 7 is obsolete and will be removed in a future release

warning: [options] target value 7 is obsolete and will be removed in a future release

warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings

warning: [options] source value 7 is obsolete and will be removed in a future release

warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.


3 warnings

warning: [options] source value 7 is obsolete and will be removed in a future release

warning: [options] target value 7 is obsolete and will be removed in a future release

warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.


3 warnings
warning: [options] source value 7 is obsolete and will be removed in a future release

warning: [options] target value 7 is obsolete and will be removed in a future release

warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.


3 warnings
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.



Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

Note: /opt/hostedtoolcache/flutter/1.22.2-stable/x64/.pub-cache/hosted/pub.dartlang.org/webview_flutter-0.3.24/android/src/main/java/io/flutter/plugins/webviewflutter/FlutterWebView.java uses unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

3 warnings

warning: [options] source value 7 is obsolete and will be removed in a future release


warning: [options] target value 7 is obsolete and will be removed in a future release

warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings

warning: [options] source value 7 is obsolete and will be removed in a future release

warning: [options] target value 7 is obsolete and will be removed in a future release

warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.

3 warnings

warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.



3 warnings


Calling mockable JAR artifact transform to create file: /home/runner/.gradle/caches/transforms-2/files-2.1/cf27c79d9a1ca383a5de54e0c43a32fe/android.jar with input /usr/local/lib/android/sdk/platforms/android-28/android.jar

Calling mockable JAR artifact transform to create file: /home/runner/.gradle/caches/transforms-2/files-2.1/8f3797ea408b2bbea5e5c1abe74922af/android.jar with input /usr/local/lib/android/sdk/platforms/android-27/android.jar

Calling mockable JAR artifact transform to create file: /home/runner/.gradle/caches/transforms-2/files-2.1/ffcaf9949b48e1d1efd7816ff2a6c939/android.jar with input /usr/local/lib/android/sdk/platforms/android-29/android.jar

Removed unused resources: Binary resource data reduced from 989KB to 939KB: Removed 5%

Removed unused resources: Binary resource data reduced from 989KB to 939KB: Removed 5%

Removed unused resources: Binary resource data reduced from 989KB to 939KB: Removed 5%

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':shared_preferences:verifyReleaseResources'.






> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade

   > Android resource linking failed

     /home/runner/.gradle/caches/transforms-2/files-2.1/3aaf6e5219b7f981ec263df919098c6f/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/fontVariationSettings not found.



     /home/runner/.gradle/caches/transforms-2/files-2.1/3aaf6e5219b7f981ec263df919098c6f/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/ttcIndex not found.





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

Running Gradle task 'assembleRelease'...                          346.6s (!)
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 cloud_firestore...
Running Gradle task 'assembleAarRelease'...                     
The plugin cloud_firestore could not be built due to the issue above.
Error: Process completed with exit code 1.```

0 个答案:

没有答案