0

I have a project that contains all the logic and the default resources, I have another two projects that use this project but at compilation time they change the project package using the "Rename Manifest Package" option from IntelliJ. And all of this working great from IntelliJ,all the project are getting compiled and run.

I mean this option:

enter image description here

Now I basically want to do the same only with Ant so I was asked to create an automated process using Ant to produce an Apk file for the base project as well as some of the other projects, that provide their own resources.

So I create an exacution task in the build.xml files that looks like this:

<exec executable="aapt" failonerror="true">
    <arg value="p" />
    <arg value="-v" />
    <arg value="-M" />
    <arg path="AndroidManifest.xml" />
    <arg value="--rename-manifest-package" />
    <arg value="com.kibo.mobi.chelsea.fc.official.keyboard" />
    <arg value="-I" />
    <arg path="C:\Android\android-sdk\platforms\android-19\android.jar" />
    <arg value="-J" />
    <arg path="C:\projects\whitesmoke\Kibo\KiboAppChelseaFC\gen" />
    <arg value="-S" />
    <arg path="C:\projects\whitesmoke\Kibo\KiboAppChelseaFC\res" />
</exec>

As well as tried to run this method from the cmd:

aapt p -v -M AndroidManifest.xml --rename-manifest-package "com.kibo.mobi.chelsea.fc.official.keyboard" -I "C:\Android\android-sdk\platforms\android-19\android.jar" -S "C:\projects\whitesmoke\Kibo\KiboAppChelseaFC\res" -J "C:\projects\whitesmoke\Kibo\KiboAppChelseaFC\gen"

In both cases I receive the following error, and many other resembling this one:

error: No resource identifier found for attribute 'brandName' in package 'com.kibo.mobi'

As I understand the problem is that the package simply is not changed, but I have no idea why. Could someone point me in the right direction and tell me what am I doing wrong?

Emil Adz
  • 40,709
  • 36
  • 140
  • 187

0 Answers0