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

EqualizerActivity Failed resolution of: Landroidx/databinding/DataBinderMapperImpl; #30

Closed
webwayscript opened this issue Apr 27, 2022 · 7 comments

Comments

@webwayscript
Copy link

Try to implement EqualizerActivity. i aaadded in AndroidManifest and PlayerService

  equaliser_button.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            EqualizerActivity.start(FmRadioPlayer_Activity.this, MyPlayerService.class);
        }
    });

i get this error

java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/databinding/DataBinderMapperImpl;
    at androidx.databinding.e.<clinit>(:32)
    at androidx.databinding.e.f(:284)
    at snow.player.ui.equalizer.EqualizerActivity.onCreate(:93)
    at android.app.Activity.performCreate(Activity.java:6662)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
    at android.app.ActivityThread.-wrap12(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6077)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
 Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.databinding.DataBinderMapperImpl" on path: DexPathList[[zip file "/data/app/com.www.www-1/base.apk"],nativeLibraryDirectories=[/data/app/com.www.www-1/lib/x86, /data/app/com.www.www-1/base.apk!/lib/x86, /system/lib, /vendor/lib]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    at androidx.databinding.e.<clinit>(:32) 
    at androidx.databinding.e.f(:284) 
    at snow.player.ui.equalizer.EqualizerActivity.onCreate(:93) 
    at android.app.Activity.performCreate(Activity.java:6662) 
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) 
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599) 
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707) 
    at android.app.ActivityThread.-wrap12(ActivityThread.java) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) 
    at android.os.Handler.dispatchMessage(Handler.java:102) 
    at android.os.Looper.loop(Looper.java:154) 
    at android.app.ActivityThread.main(ActivityThread.java:6077) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756) 
@jrfeng
Copy link
Owner

jrfeng commented Apr 27, 2022

Sorry, the last reply is wrong. I have deleted it. Please add the following rules to your proguard-rules.pro file and try again:

-keep class androidx.databinding.** { *; }
-keep class snow.player.ui.databinding.** { *; }

@webwayscript
Copy link
Author

no luck same problem

   java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/databinding/DataBinderMapperImpl;

@jrfeng
Copy link
Owner

jrfeng commented Apr 27, 2022

try:

-keep class snow.player.ui.** { *; }

@webwayscript
Copy link
Author

its happend also if i disable minifyEnabled false.

@webwayscript
Copy link
Author

I try all but its not wok same error .

@jrfeng
Copy link
Owner

jrfeng commented Apr 28, 2022

try enable dataBinding for you application module:

android {
    ...

    dataBinding {
        enabled = true
    }
}

@webwayscript
Copy link
Author

yes now working thank you

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

2 participants