|Re: Moving app from ADT 20 to ADT 21 causes java.lang.NoSuchFieldError||Adam Vollmer||12/6/12 8:18 AM|
This may be related to my problem, where a library resource depends on a library resource, and ends up with the resource moving which R file it belongs to in the application. The solution for me was to rename all of the affected library project package names to the application package name, but that may not be suitable for you.
On Thu, Dec 6, 2012 at 7:36 AM, Henrique Sousa <henrique.so...@gmail.com> wrote:
Good morning everyone,
|Re: Moving app from ADT 20 to ADT 21 causes java.lang.NoSuchFieldError||Xavier Ducrohet||12/6/12 10:03 AM|
As Adam indicates in his reply, this may be due to shared package name
in different libraries.
We have a 21.0.1 going to through final testing that will fix this
issue (by supporting it when it can, and stopping the build when it
In the mean time, check your library package names and change them if
this applies to you. If not we'll have to investigate further.
Android SDK Tech Lead
http://developer.android.com | http://tools.android.com
Please do not send me questions directly. Thanks!
|Re: Moving app from ADT 20 to ADT 21 causes java.lang.NoSuchFieldError||Henrique Sousa||12/7/12 5:14 AM|
Turned out you were right, we had two libraries with the same package name in both of them.
However I renamed both packages to distinct names and cleaned all projects, but the problem remained.
We'll wait for a fix then. If you need more info, I'll gladly help in any way you'll need. I've attached a picture of the offending R.string.
Thanks again for your effort.
My best regards,
|Re: Moving app from ADT 20 to ADT 21 causes java.lang.NoSuchFieldError||Harshad RJ||12/29/12 11:11 AM|
This is affecting me as well. And I don't have common package names between library and app.
I have a library project in which I store common resources, and my apps depend on this library project to provide resources. This used to work fine until ADT 21, but now, because of the optimisation of R class I think, the app builds fail.
Is there a way to prevent ADT from optimising fields in the R class?