Android: Including multiple Java Packages to Manifest

前端 未结 5 972
执笔经年
执笔经年 2020-12-05 04:22

The app I am developing has many activities organized into seven java packages. Originally I wrote all the coding and stuff for each group of activities in a java package as

5条回答
  •  广开言路
    2020-12-05 05:18

    I am using APK Builder and all xml resources are declared in an auto generated java file by aapt. Its package name is you guess, the android manifest package name.

    Then it dawned on me that xml files dont have package names. All xml files are just xml files. Then aapt generates an R class with all XML resources in one R class. The package name of this class is the one in the manifest.

    So either import package-name.R or just use one package for your entire project.

提交回复
热议问题