我在通用模块中有3个模块(common,app1,app2),我希望布局在app1中为黑色,在app2中为白色。
Layout.xml
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:baselineAligned="false"
android:orientation="horizontal"
android:padding="16dp"
android:background="@color/myColorBackground"
android:weightSum="4">
...
App1 colors.xml
<ressources>
<color name="myColorBackground">#fff</color>
</resources>
App2 colors.xml
<ressources>
<color name="myColorBackground">#000</color>
</resources>
当我尝试构建应用程序时,我崩溃了。是否有使用这种颜色的解决方案?