3

Error generating R.java from manifest

What does this mean? And how I fix it?

[ERROR] Error generating R.java from manifest
[ERROR]:Project failed to build after 937ms
Daahrien
  • 10,190
  • 6
  • 39
  • 71
user2437834
  • 41
  • 1
  • 4

5 Answers5

7

I got into this error and wasted around 3 hours to resolve this actually the problem is when using new android SDK you got into this error. Basically some files are moved into the build-tools directory in new sdk but they should be in platoform-tools directory So, In simple words just copy the aapt.exe file , dx.bat file and lib folder into platform-tools directory hopefully this will solve your issue. This is a bug which is reported into JERA. This Link will Help you

Try this and tell me back if this resolved your problem.

Community
  • 1
  • 1
nadeem gc
  • 484
  • 1
  • 8
  • 22
1

http://developer.appcelerator.com/question/114521/error-error-generating-rjava-from-manifest

"There are a number of reasons that this can happen. Firstly, are you setting an application name in the correct format, which is com.yourcompany.appname? Pay attention to the hint text of the field before you type anything.

Also, file or folder names containing non-ascii characters can cause problems.

Lastly, if you have any non-ascii characters in your js files, you need to ensure that the files are encoded using utf8.

Please report back if you find the solution.

Cheers"

Daahrien
  • 10,190
  • 6
  • 39
  • 71
1

That helped me too: I copied over those 2 files and "lib" folder (along with its contents) from

C:\Users\amohiuddin\android-sdks\build-tools\17.0.0

to

C:\Users\amohiuddin\android-sdks\platform-tools

then closed the Emulator, and cleaned and re-build the app in Titanium Studio. It worked.

Abdullah.M
  • 61
  • 7
1

I met this problem by incorrectly set my package id in tiapp.xml, e.g.: ( notice the <id> node and the "package" attribute in <manifest> node, they must be the same)

<ti:app xmlns:ti="http://ti.appcelerator.org">
   <id>com.test.tuju</id>
   <name>test_tu_ju</name>

   <android xmlns:android="http://schemas.android.com/apk/res/android">
      <manifest android:versionCode="10" android:versionName="3.5" package="com.test.tuju">
          <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23"/>

refer to: https://github.com/jamesfalkner/liferay-android-beacons/issues/3

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
Siwei
  • 19,858
  • 7
  • 75
  • 95
  • I missed this answer, and I found it myself after a couple of hours fiddling around. Thank you – Alberto M Jan 22 '19 at 11:29
  • hi @AlbertoM , another suggestion: Don't use Titanium. it's not mature. For me, if the project is serous, use Native Android. If not so serious, use React Native. Which is better than Ti. – Siwei Jan 22 '19 at 11:39
  • we went through the Titanium path a long time ago and now backpedalling is just not convenient time and money wise. We still have a couple of projects that are based on Titanium and we need to keep them up to date. The newer projects are all native. We decided not to use React Native just because it doesn't really speed up the development process. – Alberto M Jan 22 '19 at 13:14
0

This is due to the dissimilarity in ti.app and android manifest.

You just comment your android code from ti.app and run the project.

Select build (right click on the project and show in finder) -> android manifest. 
Copy the contents and replace in ti.app
Shima
  • 33
  • 7