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
- TypeError: Cannot read private member xxx from an object whose class did not declare itErrorObject
- _OBJC_CLASS_$_某檔名", referenced from:的問題OBJ
- Non-static method 'save(java.long.Object)' cannot be referenced from a static context.JavaObjectContext
- vue Cannot find module @/xxx/xxx.ts or its corresponding typeVue
- 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
- type[xxx]的用法
- 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
- webstorm vue3+ts報錯:Cannot find module ‘@/views/xxx.vue‘ or its corresponding type declarationsWebORMVueView
- 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
- TypeScript中,type、interface、class的區別TypeScript
- 當執行import vue from ‘vue‘ 或其它import xxx from ‘xxx‘ 時發生了什麼?ImportVue
- 開發中遇到的bug-Property or method “xxxx“ is not defined on the instance but referenced during render.
- 使用req.session.xxx時出現 Cannot set property ‘xxxx‘ of undefinedSessionUndefined
- ImportError: cannot import name ‘BaseQuery‘ from ‘flask_sqlalchemy‘ImportErrorFlaskSQL
- MapStruct-plus cannot find converter fromStruct
- 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