how to declare two packages with their activities in android manifest file?

前端 未结 2 557
陌清茗
陌清茗 2021-02-06 01:53

I have two packages in my android application. How to mention those different packages along with their activities in android manifest file?In my code I have gi

2条回答
  •  自闭症患者
    2021-02-06 02:23

    It seems you have made a few mistakes in the XML:

    
        
    
            1) BELOW: starting the names by "." means that
            you are implicitely extending the package prefix defined in the package 
            attribute of the manifest XML tag. 
            For example, if your package is "com.tabwidget", defining".MyActivity"
            will be interpreted as "com.tabwidget.MyActivity"
            By removing the first ".", you use an explicit notation instead:
            whatever your package is, "com.tabwidget.MyActivity" is interpreted
            as "com.tabwidget.MyActivity"
            
            
            
        
                      
    
    2) BELOW: a manifest file should only contain one manifest XML tag:
    
        
    
            3) BELOW: same mistake as 1)
            
        
    
    

    What follows should work. It fixes these 3 mistakes:

    
        
            
            
            
            
        
    
    

提交回复
热议问题