将依赖项迁移到Android Jetpack

所以我一直在将我的依赖项从支持库迁移到jetpack映射,如 this link所述.

我现在在构建我的应用程序时遇到错误,让我一无所知.我不知道是什么导致这个错误导致它看起来像生成的资源.

错误是:

Android resource linking Failed
Output:  C:\Users\Ruben\Documents\Bowvie\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:8673: error: expected reference but got (raw string) #000000.
error: Failed linking references.

Command: C:\Users\Ruben\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-alpha14-4748712-windows.jar\90bbfcfb9476bccff8420ad6f86bed60\aapt2-3.2.0-alpha14-4748712-windows\aapt2.exe link -I\
        C:\Users\Ruben\AppData\Local\Android\Sdk\platforms\android-P\android.jar\
        --manifest\
        C:\Users\Ruben\Documents\Bowvie\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
        -o\
        C:\Users\Ruben\Documents\Bowvie\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
        -R\
        @C:\Users\Ruben\Documents\Bowvie\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
        --auto-add-overlay\
        --java\
        C:\Users\Ruben\Documents\Bowvie\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
        --custom-package\
        nl.fdyr.movies\
        -0\
        apk\
        --output-text-symbols\
        C:\Users\Ruben\Documents\Bowvie\app\build\intermediates\symbols\debug\R.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”>
< item name =“statusBarBackground”> @ null< / item>
< /风格>

哪个应该覆盖原始值并解决问题.

相关文章

迭代器模式(Iterator)迭代器模式(Iterator)[Cursor]意图...
高性能IO模型浅析服务器端编程经常需要构造高性能的IO模型,...
策略模式(Strategy)策略模式(Strategy)[Policy]意图:定...
访问者模式(Visitor)访问者模式(Visitor)意图:表示一个...
命令模式(Command)命令模式(Command)[Action/Transactio...
生成器模式(Builder)生成器模式(Builder)意图:将一个对...