The type XXX cannot be resolved.It is indirectly referenced from required .class
編碼時遇到編譯錯誤:
The type XXX cannot be resolved.It is indirectly referenced from required .class
字面意思就是:某個類無法被解析,因為它在某個.class檔案中是間接引用的。
原因:我在工程A裡引用了另一個工程B,想使用B中的一個構造方法Con(),而這個方法有是繼承了B中的某個jar包裡的類,所以報的這個錯誤。
解決方法:將B裡的相關jar檔案放到A工程裡面,問題解決
如果是maven專案下的子專案直接重新clean一下B專案錯誤就自動解決了!
相關文章
- It is indirectly referenced from required .class fileUI
- "_OBJC_CLASS_$_XXX", referenced from:OBJ
- xxx cannot be resolved to a type
- _OBJC_CLASS_$_某檔名", referenced from:的問題OBJ
- Non-static method 'save(java.long.Object)' cannot be referenced from a static context.JavaObjectContext
- a commponent required a bean of type XXXXXX that could not be found-2022新專案UIBean
- Type與Class
- "_dns_free_resource_record", referenced from:問題DNS
- cannot convert (type interface {}) to type int: need type assertion
- 更新xcode8後真機除錯報code signing is required for product type 'xxxxx' in SDK 'iOS 10.0'XCode除錯UIiOS
- JSON parse error: Cannot deserialize value of type `java.time.LocalDateTime` from StringJSONErrorJavaLDA
- The type List is not generic; it cannot …
- Cannot infer type arguments for PageImpl
- Required parameter $xxx follows optional parameter $yyyUI
- Golang Cannot use ss(type AAA) as type AAA in map indexGolangIndex
- Cannot set property ‘type‘ of null(vue)NullVue
- error: '[class name]' does not name a typeError
- error: ‘xxx’ does not name a typeError
- Array type xxx is not assignable
- 問題解決local variable 'xxx' referenced before assignment
- Python的UnboundLocalError: local variable 'xxx' referenced before assignmentPythonError
- PostgreSQL cache lookup failed for type XXXX 錯誤SQLAI
- SAP MRKO Error - For document type RE, an entry is required in field Reference -ErrorUI
- cannot import name ‘multiarray‘ from ‘numpy.core‘Import
- QT中error: xxx does not name a type xxx錯誤QTError
- 當執行import vue from ‘vue‘ 或其它import xxx from ‘xxx‘ 時發生了什麼?ImportVue
- 使用req.session.xxx時出現 Cannot set property ‘xxxx‘ of undefinedSessionUndefined
- 開發中遇到的bug-Property or method “xxxx“ is not defined on the instance but referenced during render.
- Vue Router Cannot find module 'XXX.vue'Vue
- ORA-00265: instance recovery required, cannot set ARCHIVELOGUIHive
- KRYPTON RECOVERS FROM A NEW TYPE OF 51% NETWORK ATTACK
- ORA-00265: instance recovery required, cannot set ARCHIVELOG modeUIHive
- J2SE - Could not find the main class: xxx.xxx.Program will exitAI
- eclipse :報錯 ‘XXXX‘ does not name a type的解決辦法Eclipse
- 解決 TypeError: Type aliases cannot be used with isinstance(). 辦法Error
- Cannot decode object of class Employee for key (NS.object.0); the class may be defined in source cod...Object
- EXT2-fs (dm-1): error: ext2_lookup deleted inode referenced 23422324XXXXErrordelete
- Error: cannot fetch last explain plan from PLAN_TABLEErrorASTAI