The main problem is that the R.java file hasn't been created. It's one of the things that the nbandroid plugin should care about, but since it doesn't, we have to do it for ourselves. The solution can be found here, but if you don't like the idea of reading all that stuff, you should append the following lines to the build.xml file of the project:
<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>
Now, build the project. The R.java file should be generated, and the build should be successful.
Partager