Nothing too exotic. I have classes in a library project, which is set to "Is Library".
The target application project uses t开发者_如何学编程his library under the Project Properties/Android section. The project is set to version 2.1-Update (api 7).
None of the classes from the library are visible in the target project. i.e. import statements referencing the classes are underlined in red.
Any ideas?
Try restarting eclipse also try selecting and applying different API level for the project, then apply, then change API level back. I sometimes seen such a problem, usually these actions help.
If your library name has a space in it, remove it.
Using MOTODEV Studio 1.2 and with the same problem.
But changing from Api Level 7 to 8 and changing again (setting up the Lib again) it starts to work.
In your project you have a src directory from your library. Try refreshing it.
Make sure the classes in your library are declared public. That fixed this problem for me.
精彩评论