Flutter APK 构建 android 资源链接失败振动包
Flutter APK build android resource linking failed vibrate package
我正在尝试为我的应用程序构建一个 apk,但我在 vibrate 包上收到资源链接失败。
我可以 运行 我的应用程序处于发布模式,我也可以构建一个应用程序包而不会失败。
两天前我已经成功构建了 apk,自此构建以来我改变了什么:
-升级到 Android studio 4.0
-运行 一个发布缓存修复(由于另一个错误现在已解决)
我得到的错误:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':vibrate:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
C:\Users\plest\.gradle\caches\transforms-2\files-2.1aeb117cf01e0e03a347b2b45aacb6fb\core-1.1.0\res\values\values.xml:142:5-173:25: AAPT: error: resource android:attr/fontStyle not found.
C:\Users\plest\.gradle\caches\transforms-2\files-2.1aeb117cf01e0e03a347b2b45aacb6fb\core-1.1.0\res\values\values.xml:142:5-173:25: AAPT: error: resource android:attr/font not found.
C:\Users\plest\.gradle\caches\transforms-2\files-2.1aeb117cf01e0e03a347b2b45aacb6fb\core-1.1.0\res\values\values.xml:142:5-173:25: AAPT: error: resource android:attr/fontWeight not found.
C:\Users\plest\.gradle\caches\transforms-2\files-2.1aeb117cf01e0e03a347b2b45aacb6fb\core-1.1.0\res\values\values.xml:142:5-173:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\plest\.gradle\caches\transforms-2\files-2.1aeb117cf01e0e03a347b2b45aacb6fb\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 22s
Running Gradle task 'assembleRelease'... 24,3s
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.
Process finished with exit code 1
我的 flutter doctor 很好,flutter clean 不会改变任何东西。
右键单击 android 面板时无法访问 flutter 面板。
编辑:
如果我 运行 详细我会在我的日志中得到这个
[ +17 ms] > Task :vibrate:extractDebugAnnotations UP-TO-DATE
[ +1 ms] > Task :vibrate:mergeDebugGeneratedProguardFiles UP-TO-DATE
[ +1 ms] > Task :vibrate:mergeDebugConsumerProguardFiles UP-TO-DATE
[ +1 ms] > Task :vibrate:prepareLintJarForPublish UP-TO-DATE
[ +1 ms] > Task :vibrate:mergeDebugJavaResource UP-TO-DATE
[ +1 ms] > Task :vibrate:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE
[ +2 ms] > Task :vibrate:transformNativeLibsWithSyncJniLibsForDebug UP-TO-DATE
[ +1 ms] > Task :vibrate:bundleDebugAar UP-TO-DATE
[ +1 ms] > Task :vibrate:compileDebugSources UP-TO-DATE
[ +1 ms] > Task :vibrate:assembleDebug UP-TO-DATE
[ +253 ms] > Task :app:mergeDebugNativeLibs
[ +1 ms] Unable to strip library
'C:\Users\plest\StudioProjects\the_spot\build\app\intermediates\merged_native_libs\debug\out\lib\x86\libflutter.so' due to
missing strip tool for ABI 'X86'. Packaging it as is.
[ +97 ms] > Task :app:stripDebugDebugSymbols
[ +1 ms] Compatible side by side NDK version was not found.
[ +1 ms] Unable to strip library
'C:\Users\plest\StudioProjects\the_spot\build\app\intermediates\merged_native_libs\debug\out\lib\x86_64\libflutter.so' due
to missing strip tool for ABI 'X86_64'. Packaging it as is.
我解决了将振动 0.0.4 升级到 flutter_vibrate 1.0.0
的问题
我正在尝试为我的应用程序构建一个 apk,但我在 vibrate 包上收到资源链接失败。 我可以 运行 我的应用程序处于发布模式,我也可以构建一个应用程序包而不会失败。 两天前我已经成功构建了 apk,自此构建以来我改变了什么: -升级到 Android studio 4.0 -运行 一个发布缓存修复(由于另一个错误现在已解决)
我得到的错误:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':vibrate:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
C:\Users\plest\.gradle\caches\transforms-2\files-2.1aeb117cf01e0e03a347b2b45aacb6fb\core-1.1.0\res\values\values.xml:142:5-173:25: AAPT: error: resource android:attr/fontStyle not found.
C:\Users\plest\.gradle\caches\transforms-2\files-2.1aeb117cf01e0e03a347b2b45aacb6fb\core-1.1.0\res\values\values.xml:142:5-173:25: AAPT: error: resource android:attr/font not found.
C:\Users\plest\.gradle\caches\transforms-2\files-2.1aeb117cf01e0e03a347b2b45aacb6fb\core-1.1.0\res\values\values.xml:142:5-173:25: AAPT: error: resource android:attr/fontWeight not found.
C:\Users\plest\.gradle\caches\transforms-2\files-2.1aeb117cf01e0e03a347b2b45aacb6fb\core-1.1.0\res\values\values.xml:142:5-173:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\plest\.gradle\caches\transforms-2\files-2.1aeb117cf01e0e03a347b2b45aacb6fb\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 22s
Running Gradle task 'assembleRelease'... 24,3s
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.
Process finished with exit code 1
我的 flutter doctor 很好,flutter clean 不会改变任何东西。 右键单击 android 面板时无法访问 flutter 面板。
编辑: 如果我 运行 详细我会在我的日志中得到这个
[ +17 ms] > Task :vibrate:extractDebugAnnotations UP-TO-DATE
[ +1 ms] > Task :vibrate:mergeDebugGeneratedProguardFiles UP-TO-DATE
[ +1 ms] > Task :vibrate:mergeDebugConsumerProguardFiles UP-TO-DATE
[ +1 ms] > Task :vibrate:prepareLintJarForPublish UP-TO-DATE
[ +1 ms] > Task :vibrate:mergeDebugJavaResource UP-TO-DATE
[ +1 ms] > Task :vibrate:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE
[ +2 ms] > Task :vibrate:transformNativeLibsWithSyncJniLibsForDebug UP-TO-DATE
[ +1 ms] > Task :vibrate:bundleDebugAar UP-TO-DATE
[ +1 ms] > Task :vibrate:compileDebugSources UP-TO-DATE
[ +1 ms] > Task :vibrate:assembleDebug UP-TO-DATE
[ +253 ms] > Task :app:mergeDebugNativeLibs
[ +1 ms] Unable to strip library
'C:\Users\plest\StudioProjects\the_spot\build\app\intermediates\merged_native_libs\debug\out\lib\x86\libflutter.so' due to
missing strip tool for ABI 'X86'. Packaging it as is.
[ +97 ms] > Task :app:stripDebugDebugSymbols
[ +1 ms] Compatible side by side NDK version was not found.
[ +1 ms] Unable to strip library
'C:\Users\plest\StudioProjects\the_spot\build\app\intermediates\merged_native_libs\debug\out\lib\x86_64\libflutter.so' due
to missing strip tool for ABI 'X86_64'. Packaging it as is.
我解决了将振动 0.0.4 升级到 flutter_vibrate 1.0.0
的问题