将依赖项迁移到Android Jetpack
发布时间:2020-05-23 11:17:51 所属栏目:程序设计 来源:互联网
导读:所以我一直在将我的依赖项从支持库迁移到jetpack映射,如 this link所述. 我现在在构建我的应用程序时遇到错误,让我一无所知.我不知道是什么导致这个错误导致它看起来像生成的资源. 错误是: Android resource linking failedOutput: C:UsersRubenDocumentsBow
|
所以我一直在将我的依赖项从支持库迁移到jetpack映射,如 this link所述. 我现在在构建我的应用程序时遇到错误,让我一无所知.我不知道是什么导致这个错误导致它看起来像生成的资源. 错误是: Android resource linking failed
Output: C:UsersRubenDocumentsBowvieappbuildintermediatesincrementalmergeDebugResourcesmerged.dirvaluesvalues.xml:8673: error: expected reference but got (raw string) #000000.
error: failed linking references.
Command: C:UsersRuben.gradlecachestransforms-1files-1.1aapt2-3.2.0-alpha14-4748712-windows.jar90bbfcfb9476bccff8420ad6f86bed60aapt2-3.2.0-alpha14-4748712-windowsaapt2.exe link -I
C:UsersRubenAppDataLocalAndroidSdkplatformsandroid-Pandroid.jar
--manifest
C:UsersRubenDocumentsBowvieappbuildintermediatesmerged_manifestsdebugprocessDebugManifestmergedAndroidManifest.xml
-o
C:UsersRubenDocumentsBowvieappbuildintermediatesprocessed_resdebugprocessDebugResourcesoutresources-debug.ap_
-R
@C:UsersRubenDocumentsBowvieappbuildintermediatesincrementalprocessDebugResourcesresources-list-for-resources-debug.ap_.txt
--auto-add-overlay
--java
C:UsersRubenDocumentsBowvieappbuildgeneratednot_namespaced_r_class_sourcesdebugprocessDebugResourcesr
--custom-package
nl.fdyr.movies
-0
apk
--output-text-symbols
C:UsersRubenDocumentsBowvieappbuildintermediatessymbolsdebugR.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.0-alpha14-4748712-windows Daemon #0
错误行(8673)是: <style name="Widget.Support.CoordinatorLayout" parent="android:Widget">
<item name="statusBarBackground">#000000</item>
</style>
新迁移的依赖项是: implementation 'com.google.android.material:material:1.0.0-alpha1' implementation 'androidx.appcompat:appcompat:1.0.0-alpha1' implementation 'androidx.cardview:cardview:1.0.0-alpha1' implementation 'androidx.browser:browser:1.0.0-alpha1' implementation 'androidx.annotation:annotation:1.0.0-alpha1' implementation 'androidx.constraintlayout:constraintlayout:1.1.0' implementation 'androidx.core:core-ktx:1.0.0-alpha1' implementation 'androidx.annotation:annotation:1.0.0-alpha1' implementation 'androidx.slice:slice-core:1.0.0-alpha1' implementation 'androidx.slice:slice-builders:1.0.0-alpha1'经过大量的实验和搜索后,似乎可以通过覆盖样式并将问题#000000中的值设置为@null来解决问题. 在res / values / styles.xml中,您可以添加 < style name =“Widget.Support.CoordinatorLayout”parent =“android:Widget”> 哪个应该覆盖原始值并解决问题. (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
