今天遇到個問題,導入別人的一個工程。。
導入之後代碼全是紅色,明顯是缺少庫,相對比其他的Android工程文件,這個竟然缺少Android的包。
The type XXX cannot be resolved. It is indirectly referenced from required .class files錯誤.....,查找的解決辦法如下:
It is indirectly referenced from required .class file
原因:你正要使用的類調用了另一個類,而這個類又調用了其他類,這種關係可能會有好多層。而在這個調用的過程中,某個類所在的包的缺失就會造成以上那個錯誤。
解決方法:導入缺失的包
添加過程:
右鍵工程-->Build Path-->Configure Build Path;
在Libraries裏 Add External JARs。
找到所需要的版本的Android的Jar文件