> How can I have my Ant build generate R.java for me?

this is the ant task we use in our build script:

    <!-- Generate the R.java file for this project's resources. -->
    <target name="resource-src" depends="init, localization, prepare-
manifest-app-version">
        <echo>Generating R.java / Manifest.java from the resources...</
echo>
        <exec executable="${aapt}" failonerror="true">
            <arg value="package" />
            <arg value="-m" />
            <arg value="-J" />
            <arg value="${outdir-r}" />
            <arg value="-M" />
            <arg value="AndroidManifest.xml" />
            <arg value="-S" />
            <arg value="${resource-dir}" />
            <arg value="-I" />
            <arg value="${android-jar}" />
        </exec>
    </target>

where
{outdir-r} = gen
{resource-dir} = res
{android-jar} = ${sdk-folder-platform}/android.jar

Hope this help.

--
.enjoy.
Alfredo

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to