Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video 70 - Error: Java.lang.NoClassDefFoundError #6

Open
MustacheProject opened this issue Sep 14, 2016 · 2 comments
Open

Video 70 - Error: Java.lang.NoClassDefFoundError #6

MustacheProject opened this issue Sep 14, 2016 · 2 comments

Comments

@MustacheProject
Copy link

Hello everyone!
I get this error

FATAL EXCEPTION: main Process: com.mustacheproject.bucketdrops, PID: 24967 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/mustacheproject/bucketdrops/extras/MUtil; at com.mustacheproject.bucketdrops.widget.BucketRecyclerView.toogleViews(BucketRecyclerView.java:69) at com.mustacheproject.bucketdrops.widget.BucketRecyclerView.access$000(BucketRecyclerView.java:19) at com.mustacheproject.bucketdrops.widget.BucketRecyclerView$1.onChanged(BucketRecyclerView.java:26) at android.support.v7.widget.RecyclerView$AdapterDataObservable.notifyChanged(RecyclerView.java:9242) at android.support.v7.widget.RecyclerView$Adapter.notifyDataSetChanged(RecyclerView.java:5493) at com.mustacheproject.bucketdrops.adapter.AdapterDrops.update(AdapterDrops.java:34) at com.mustacheproject.bucketdrops.ActivityMain$2.onChange(ActivityMain.java:52) at io.realm.RealmResults.notifyChangeListeners(RealmResults.java:1014) at io.realm.HandlerController.completedAsyncRealmResults(HandlerController.java:476) at io.realm.HandlerController.handleMessage(HandlerController.java:123) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.mustacheproject.bucketdrops.extras.MUtil" o

The class MUtil is just the Util class create in the tutorial, the first string reported in the error
'
at com.mustacheproject.bucketdrops.widget.BucketRecyclerView.toogleViews(BucketRecyclerView.java:69)'

is MUtil.hideViews(mEmptyViews);

in the break
`}else{

            //hide the emptyViews
            MUtil.hideViews(mEmptyViews);
            //set the recycle visible
            setVisibility(View.VISIBLE);
            //show the non empty views
            MUtil.showViews(mNonEmptyViews);
        }`

I sincerely don't understand what is the problem, searching on internet I found some issue related to this error regarding the libraries for different version, but I could't go further than this!

Thank you.

Eugenio

@slidenerd
Copy link
Owner

No classdef found error simply means you dont have the class, looks like you dont have this one MUtil

@tooha
Copy link

tooha commented Nov 23, 2016

I had this Error
'void android.view.View.setVisibility(int)' on a null object reference

public static void showViews(List views) {
for (View view : views) {
view.setVisibility(View.VISIBLE);
}
}

due to this Line >> view.setVisibility(View.VISIBLE);

I fixed, in MainActivity By Casting
mEmptyView = (View) findViewById(R.id.empty_drops); to 'View'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants