What's the correct syntax to define an activity in manifest file

前端 未结 7 1228
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-11 01:22

What is the correct way of adding an activity to AndroidManifest.xml?

Actually I have seen in many places an activity defined as



        
7条回答
  •  南方客
    南方客 (楼主)
    2020-12-11 02:05

    Using relative paths is fine.
    The path is separated by a dot, rather than a slash.

    android:name=".one_path_level_down.MainActivity"
    android:name=".one_path_level_down.DetailActivity"
    

    The top level is the package level in your manifest file in the "package=". Something like the following:

    
    

提交回复
热议问题