简体   繁体   中英

Android studio only finding “some” classes when browsing SDK sources

I seem to be having a massive problem with paths when browsing the SDK sources. Basically my issue is this:

I can import (for example) android.annotation.NonNull into my own project and it recognises the class fine. But if I open Activity.java I get random classes not being able to be found - but they exist in the correct path. For example it can find android.os.PersistableBundle (which exists at androidSDK\\sources\\android-23\\android\\os\\PersistableBundle.java), but not android.annotation.NonNull (which exists at androidSDK\\sources\\android-23\\android\\annotation\\NonNull.java)

I have tried invalidating caches and restarting, re-installing android studio, installing different versions and even redownloading the whole SDK, but nothing is making it happy. Is there a place I should be setting the 'root' path? How come it finds some classes but not others?

Android 1.2 or idea 14 do not have this problem. After this version have this problem. You can view thie SDK source by use the Android 1.2. Click here to download . Unfortunately, Android 1.2 version has some other bug.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM