Many automated packages on the Internet compete for packages that cannot be connected to the same project. Currently, what I want to do is like xunfei voice, you need to generate the example project with the changed package name based on your registration information, but what we provide is that the apk package does not need the source code. Company Daniel writes shell scripts, round the project to replace all packagename. Now I am sharing a sample of google. I only need to modify the configuration of the corresponding build. xml file under the sdk, so that the apk of packagename cannot be connected to the same project.
You only need to add manifestpackage = "$ {package. manifest. name}" in the-package-resources command, so that the package name is changed to the actual value of package. manifest. name. As follows:
'''Java
<Target name = "-package-resources" depends = "-crunch">
<! -- Only package resources if * not * a library project -->
<Do-only-if-not-library elseText = "Library project: do not package resources...">
<Aapt executable = "$ {aapt }"
Command = "package"
Versioncode = "$ {version. code }"
Versionname = "$ {version. name }"
Debug = "$ {build. is. packaging. debug }"
Manifest = "$ {out. manifest. abs. file }"
Assets = "$ {asset. absolute. dir }"
Androidjar = "zookeeper project.tar get. android. jar }"
Apkfolder = "$ {out. absolute. dir }"
Nocrunch = "$ {build. packaging. nocrunch }"
Resourcefilename = "$ {resource. package. file. name }"
Resourcefilter = "$ {aapt. resource. filter }"
LibraryResFolderPathRefid = "project. library. res. folder. path"
LibraryPackagesRefid = "project. library. packages"
LibraryRFileRefid = "project. library. bin. r. file. path"
Previusbuildtype = "zookeeper build.last.tar get }"
BuildType = "zookeeper build.tar get }"
IgnoreAssets = "$ {aapt. ignore. assets }"
Manifestpackage = "$ {package. manifest. name}">
<Res path = "$ {out. res. absolute. dir}"/>
<Res path = "$ {resource. absolute. dir}"/>
<! -- <Nocompress/> forces no compression on any files in assets or res/raw -->
<! -- <Nocompress extension = "xml"/> forces no compression on specific file extensions in assets and res/raw -->
</Aapt>
</Do-only-if-not-library>
</Target>
'''
You can run the android update command in cmd. command to generate a build under the project. xml file, you can see the build used for packaging under the referenced sdk. modify the xml file by copying the file and modifying the reference. These will not be repeated.
Transfer door http://my.eoe.cn/109830/archive/15436.html