IntelliJ adds the original android path does not work fully

I have connected the Android source code via File> Project Structure> Modules> Dependencies> double-click the path to the Android Platform>.

works for the most part, but in many source classes IntelliJ complains about unresolved things, such as variables that it does not know about. Many times these vars are inherited from the superclass. Why can't IntelliJ understand this? It has no problem declaring a superclass and any other way of navigating ...

+4
source share
2 answers

The Android SDK does not contain all the sources, to get them all you need to use some tricks, such as those described in this blog post .

There are scenarios that can build a single source jar from the build tree of the Android platform, as shown in the link above. If you read the comments and links in this post, you can find pre-built banks for different platforms that you can download and connect as an Android SDK source in IntelliJ IDEA or Eclipse.

+3
source

Similar confusion here. In the section "Project Structure"> "Modules"> "Sources" I had to add "Content Root", in my case - the directory "/ opt / android-sdk-linux / sources / android-19". Then mark the subdirectory "android" as the blue source folder.

Yes, like you, my project structure showed the correct entry in the "Platform Settings"> "SDK"> "Android API"> "Source Path" section, but this is clearly not enough for intellij to resolve all Android SDK characters.

0
source

Source: https://habr.com/ru/post/1392777/


All Articles