In the androidsource code, a certain number of Members, classes or packages (with the package.html file) are tagged with @ hide. These classes, methods, or members are not publicly available in the SDK, such as Android. app. activitythread, similar to Android. text. method. touch's getmaxscrollx () method, similar to Android. view. view members, such as mscrollx. Therefore, when these classes are used, the system prompts that the class or members cannot be resolved. The following provides a solution to this problem.
First, download the android source code for compilation. Then, find the JAR file that contains the modules of the hidden classes in the compiled out directory. The file name is usually classes. jar. For example, the JAR file of the Framework is out argetcommonobjjava_librariesframework_intermediatesclasses.jar. Finally, in the android project of Eclipse, choose project properties-> JAVA build path-> libraries-> Add library-> User library-> next-> User libraries to go to the user libraries management page, and click New to create a user library, for example, android_framework, click Add jars to add the jar package to the created user library, and click OK. To access such members, you need to change the Class search order. Select Project Properties> JAVA build path> order and export to move the created user libraries to the android SDK.