Pregunta

I have updated today to the latest SDKTools, r21 and the projects are no longer packed correctly.

I am using for instance ActionBarSherlock as a library project, and when I run the application I get the following error :

java.lang.NoClassDefFoundError: com.actionbarsherlock.R$styleable

I have reverted back to r20 and it works again.

Did anything changed, and we should add different the library projects? I can't see something like this in the Release General Notes.

¿Fue útil?

Solución

Yeh, it is ADT r21 causing it.

http://tools.android.com/download/adt-21-preview#TOC-New-in-ADT-21-Preview-5 The R classes for library projects are generated with only the IDs needed by the libraries, reducing the risk of hitting dex files limits for fields and methods.

You need to clean up the bin folder in the library project manually.

You can check the update on Tor Norbye google+ page https://plus.google.com/116539451797396019960/posts/KVax2483Erk

Otros consejos

Same problem but i have fixed it.

What i did:

  1. Project / Clean / Build on all library projects
  2. Removed the library projects and readded it on the android project
  3. Android Tools / Fix Project Properties on the android project
  4. Project / Clean / Build on the android project

Hope this helps and is also working for you.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top