Failed to Setting up android project

Asked By 0 points N/A Posted on -
qa-featured

 

Hello all

I have recently been trying to set up an android project. For this I first used net beans. Using netbeans was a good experience as everything worked well but the it ended up in an error about "R package". The screenshot os the error is attached below:

 

 

Then I went to eclipse and followed all the instructions regarding everything but again I got the same error. I really don’t have a clue why is it relating to the R package.

If anyone has any idea, please do let me know. I'll be really obliged.

Kind regards

SHARE
Answered By 0 points N/A #181206

Failed to Setting up android project

qa-featured

Hi,

This problem is common for those people doing android application in Netbeans and Eclipse. So to solve your problem you have to add another new target to your build.xml. Copy the code below to your build.xml. After adding the code you can now compile your work and see the result. I hope this can help you a lot.


<target name="-pre-compile">
<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="${src.dir}" />
<arg value="-M" />
<arg value="AndroidManifest.xml" />
<arg value="-S" />
<arg value="${resource.dir}" />
<arg value="-I" />
<arg value="${platform.bootcp}"/>
</exec>
</target>

 

 

Login/Register to Answer

Related Questions