android library project and Activities

后端 未结 2 1832
南笙
南笙 2020-12-13 20:00

I\'m developing an Android SDK library. In this library I\'ve declared and used some Activities. Now I\'ve tried to include the library in an application but I\'ve noticed t

2条回答
  •  天涯浪人
    2020-12-13 20:32

    No, this is a known limitation of the libraries at the moment. There is a lot of discussion in the android development community of fixing this in the future, but for now it is a limitation of how they do libraries.

    From the doc

    In the manifest file of the application project, you must add declarations of all components that the application will use that are imported from a library project. For example, you must declare any , , , , and so on, as well as , , and similar elements.

    Also, excellent answer here by Mark Murphy.

提交回复
热议问题