fluttercommunity / fluttercommunity/flutter_webview_plugin
flutter_webview_plugin throws error while generating .apk file
- 主要言語
- Java
- スター
- 1.5k
- フォーク
- 938
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I want to generate .apk file for my application.But it is not able to do so because of AndroidX incompatibility for flutter_webview_plugin.I tried everything as per https://flutter.dev/docs/development/androidx-migration ,still nothing is helping:
This is the error I am getting when I run:
C:\flutter\flutter\flutter\bin\flutter.bat --no-color build apk
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
Running Gradle task 'assembleRelease'...
Removed unused resources: Binary resource data reduced from 517KB to 502KB: Removed 2%
Running Gradle task 'assembleRelease'... 618.1s (!)
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 android_alarm_manager...
Running Gradle task 'assembleAarRelease'...
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':launch_review:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
C:\Users\w8\.gradle\caches\transforms-2\files-2.1\0a271e99b6771ad4a84318244d532fb7\core-1.0.0\res\values\values.xml:57:5-88:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\w8\.gradle\caches\transforms-2\files-2.1\0a271e99b6771ad4a84318244d532fb7\core-1.0.0\res\values\values.xml:57:5-88: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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':screen_state:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
C:\Users\w8\.gradle\caches\transforms-2\files-2.1\0a271e99b6771ad4a84318244d532fb7\core-1.0.0\res\values\values.xml:57:5-88:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\w8\.gradle\caches\transforms-2\files-2.1\0a271e99b6771ad4a84318244d532fb7\core-1.0.0\res\values\values.xml:57:5-88: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 10m 8s
42.9s
√ Built build\app\outputs\repo.
Building plugin android_intent...
Running Gradle task 'assembleAarRelease'... 10.7s
√ Built build\app\outputs\repo.
Building plugin flutter_webview_plugin...
Running Gradle task 'assembleAarRelease'...
The plugin flutter_webview_plugin could not be built due to the issue above.
Process finished with exit code 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、報告された `flutter build apk` の失敗を再現し、`flutter_webview_plugin` の Android ビルド設定を調査します。特に、`launch_review` と `screen_state` に関連する AndroidX およびリソースリンクエラーを確認します。プラグインを AAR として正常にビルドでき、アプリケーションがこれらの失敗なしに APK を生成できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- android, flutter, java
- 領域
- build-system, mobile
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100