Thursday, March 22, 2012

Re: [android-developers] Re: NoClassDefFoundError for gson after updating the ADT and SDK Tools

Just updated to tools 17 and got this in most projects:

Implicit super constructor Object() is undefined for default
constructor. Must define an explicit constructor

And

The project was not built since its build path is incomplete. Cannot
find the class file for java.lang.Object.Fix the build path then try
building this project

Fix Project Properties fixed some projects, but not all.

What did help was:

I brought up project Properties / Android, selected a different
Android API version, clicked Apply, then changed the API version back
to what it was and clicked Apply again.

The improvements in these new tools are very welcome, but come on,
does anyone ever test how well new tools can migrate existing
projects?

-- K

22 марта 2012 г. 16:12 пользователь Yasin YILDIRIM
<yasinyildirim495@gmail.com> написал:
> It worked! Thanks :)
>
> On Mar 22, 1:03 pm, Mark Murphy <mmur...@commonsware.com> wrote:
>> You can try:
>>
>> http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-...
>>
>> On Thu, Mar 22, 2012 at 6:39 AM, Yasin YILDIRIM
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> <yasinyildirim...@gmail.com> wrote:
>> > Today I updated my ADT and SDK Tools to v17 and my projects using
>> > Google's gson jar library started to throw NoClassDefFoundError.
>> > Here's the logcat:
>>
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672): FATAL EXCEPTION: main
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672):
>> > java.lang.NoClassDefFoundError: com.google.gson.Gson
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672):    at
>> > com.matriksdata.conn.XRequestHandler.connect(XRequestHandler.java:35)
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672):    at
>> > com.matriksdata.conn.XRequestHandler.makeRequest(XRequestHandler.java:
>> > 29)
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672):    at
>> > com.matriksdata.bavul.XBaseWithConnectionActivity.makeRequest(XBaseWithConn ectionActivity.java:
>> > 46)
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672):    at
>> > com.matriksdata.ui.login.SplashScreenActivity.onCreate(SplashScreenActivity .java:
>> > 36)
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672):    at
>> > android.app.Activity.performCreate(Activity.java:4465)
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672):    at
>> > android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
>> > 1049)
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672):    at
>> > android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
>> > 1919)
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672):    at
>> > android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
>> > 1980)
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672):    at
>> > android.app.ActivityThread.access$600(ActivityThread.java:122)
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672):    at
>> > android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146)
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672):    at
>> > android.os.Handler.dispatchMessage(Handler.java:99)
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672):    at
>> > android.os.Looper.loop(Looper.java:137)
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672):    at
>> > android.app.ActivityThread.main(ActivityThread.java:4340)
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672):    at
>> > java.lang.reflect.Method.invokeNative(Native Method)
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672):    at
>> > java.lang.reflect.Method.invoke(Method.java:511)
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672):    at
>> > com.android.internal.os.ZygoteInit
>> > $MethodAndArgsCaller.run(ZygoteInit.java:784)
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672):    at
>> > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
>> > 03-22 12:30:58.941: E/AndroidRuntime(21672):    at
>> > dalvik.system.NativeStart.main(Native Method)
>>
>> > any ideas?
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to android-developers@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-developers+unsubscribe@googlegroups.com
>> > For more options, visit this group at
>> >http://groups.google.com/group/android-developers?hl=en
>>
>> --
>> Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>>
>> _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.5
>> Available!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment