Error-Expected resource of type
原標題:Error-Expected resource of type styleable [ResourceType]
錯誤資訊
Expected resource of type styleable [ResourceType]
錯誤原因最近在專案中由於要使用沉浸式通知欄,所以使用了一個工具類SystemBarTintManager,而這個工具類在專案打包的過程中提示了一個錯誤:Expected resource of type styleable
解決方案在stackoverflow中發現很多人反饋這個問題,解決方案是在使用 TypedArray 的方法宣告處頂部加上 @SuppressWarnings(“ResourceType”) 忽略該警告,然後就可以正常簽名編譯。具體做法如下:
@SuppressWarnings("ResourceType")
public SystemBarTintManager(Activity activity) {
……
}
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/3209/viewspace-2799821/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- A resource type with the name 'ora.daemon.type' is already registered
- Access restriction: The type 'Resource' is not API 解決辦法RESTAPI
- Android Studio 打包APK遇到Error: Expected resource of type id [ResourceType]AndroidAPKError
- Laravel Resource Routes和API Resource Routes講解LaravelAPI
- variable: Type 與 Type variable
- 【譯】Resource Hints
- RESOURCE_LIMITMIT
- cannot convert (type interface {}) to type int: need type assertion
- Value Type vs Reference Type in SwiftSwift
- Metasploit resource命令技巧
- Oracle Database Resource ManagerOracleDatabase
- vue-resource 小抄Vue
- Resource temporarily unavailableAI
- Oracle simple resource planOracle
- v$resource_limitMIT
- Oracle Resource Manager概述Oracle
- CRS: Resource in UNKNOWN state and srvctl Cannot Start/Stop Resource_845709.1
- Type in Chakra
- DRM - Dynamic Resource MasteringAST
- Spring系列.Resource介面Spring
- Resource is out of sync with the file system
- HITSC_4_Data Type and Type Checking
- profile的resource limits和資源計劃resource_manager_plan的limitMIT
- Golang Cannot use ss(type AAA) as type AAA in map indexGolangIndex
- 2.7 Overview of Oracle Resource Manager in a CDBViewOracle
- Matrix原始碼分析————Resource Canary原始碼
- @Autowired 與@Resource的區別
- vue_resource和axiosVueiOS
- @Autowired 和 @ Resource的區別
- @Resource和@Autowired的區別
- Oracle 資源管理(resource manager)Oracle
- @Autowired與@Resource的區別
- open failed: EBUSY (Device or resource busy)AIdev
- oracle resource manager (ORM)舉例OracleORM
- v$resource_limit檢視MIT
- How To Change UNIX Process Resource LimitsMIT
- Script: resource_waits.sqlAISQL
- WPF FindResource,Resource[key] SystemColors TryFindResource