A TaskDescription's primary color should be opaque

在我今天做项目的时候,我设置colorPrimary是给了一个透明度,华为7.0系统运行正常,OPPO运行崩溃

引起APK无法运行:A TaskDescription's primary color should be opaque

解决方案:不要给主题的name=“corlorPrimary”设置透明度的颜色值

以下是错误写法:

<color name="colorPrimary">#90EC191B</color>
 
 

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="android:windowBackground">@drawable/splash </item> <!--<item name="android:windowFullscreen">true</item>--> <!--<item name="android:windowBackground">@android:color/transparent</item>--> <item name="android:windowNoTitle">true </item> <item name="colorPrimary">@color/colorPrimary </item> <item name="colorPrimaryDark">@color/colorPrimaryDark2 </item> <item name="colorAccent">@color/colorPrimaryDark2 </item> </style>

猜你喜欢

转载自blog.csdn.net/qq_39897005/article/details/80285072