Using an Android library project Activity within another project

前端 未结 8 1387
余生分开走
余生分开走 2020-11-30 01:37

I have an Android library project that I would like to use from within another Android project.

The library has a Activity declared in its AndroidManifest. When I t

8条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-30 02:30

    I believe you must include the in your own AndroidManifest.xml -- I don't think it gets picked up from a library. I don't have my reference for that handy.

    Update: It's official solution. From the doc:

    Declaring library components in the manifest file

    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.

    Declarations should reference the library components by their fully-qualified package names, where appropriate.

提交回复
热议问题