1

I'm trying include a library inside my android project, I include the library from android properties. Both projects (lib and my project) is compiling with the same version of android, both have the same compatibility lib. If I include the same lib in a example project work fine.

My problem is when I include the lib in my project and refresh, the R files are not generating and appear the error "aapt: Return code 139" I put the verbose mode in the builder, but the errors appear in diferent places.

I did the same in other machine (both are macs), with the same adt and same eclipse version and works.

I tryed to increase the eclipse memory but this don't resolve the problem.

Somebody knows what it is happen? What is the error 139? why do it works in one machine and not in other?

Thanks,

flipper83
  • 819
  • 1
  • 9
  • 24
  • I will give that for imposible – flipper83 Feb 04 '13 at 16:43
  • which library? Stupid question but, is not showing errors in any "/res" folder? Can you include this lib in the same pc but in another project? Maybe collisions in the R generated file? – raultm Feb 05 '13 at 19:24
  • it's pull-to-refresh lib, from chris banes, I'm include in the test project that it's include with the library and works fine. I thought the same, that its posible some collisions, I started to remove resources and finish compiled, but when I added again the first that i removed start to fail again. Too rare :S. – flipper83 Feb 05 '13 at 22:45
  • One friend could reproduce the error in his laptop too, the only coincidence is both have montain lion, but this dont have sense :S – flipper83 Feb 05 '13 at 22:45
  • So weird! Have you checked out the values of the resources in the R file without the lib and then compare them with the values of the lib's R file? This misbehaviour annoyes me, if you have the Mark Murphy's subscription you may ask him. It's not related with the book but he can be interested. – raultm Feb 06 '13 at 08:26
  • I will do more test, if I find something, it's a good option tell to Mark Murphy ^_^U thanks for all – flipper83 Feb 06 '13 at 12:04
  • I found the problem, i dont know why, but if I have an attr, with flag, this break the aadt build? Oo – flipper83 Feb 12 '13 at 15:07
  • you didn't give up! An odd behaviour, they, Google, usually add flags inside attr tags. It's nice to hear it's working – raultm Feb 14 '13 at 09:33
  • If you had the same problem, have a look [here][1] [1]: http://stackoverflow.com/questions/16297338/segmentation-fault-with-aapt/16626530#16626530 – Francisco Javier Fernández May 18 '13 at 16:43

1 Answers1

6

Can be linked with ids generation issue.
Don't use @+id/... in styles.
@+id/... can only be used in layouts.
Otherwise you can get Error executing apt: return code 139 during build.
Use @id/... and generate ids with help resource file if needed: res/values/ids.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <item type="id" name="header" />
    <item type="id" name="footer" />
</resources>

http://developer.android.com/guide/topics/resources/more-resources.html#Id

Sensei
  • 396
  • 6
  • 7