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

after migrate to androidx and enable databinding in gradle still error occur #4

Closed
rajam1215 opened this issue May 3, 2019 · 4 comments

Comments

@rajam1215
Copy link

2019-05-03 09:59:29.628 8172-8172/com.royalways.pioneercranes E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.royalways.pioneercranes, PID: 8172
java.lang.NoSuchMethodError: No direct method (Landroidx/databinding/DataBindingComponent;Landroid/view/View;I)V in class Landroidx/databinding/ViewDataBinding; or its super classes (declaration of 'androidx.databinding.ViewDataBinding' appears in /data/app/com.royalways.pioneercranes-2/split_lib_dependencies_apk.apk)
at com.manojbhadane.holdy.databinding.ActivityHolderBinding.(ActivityHolderBinding.java:23)
at com.manojbhadane.holdy.databinding.ActivityHolderBindingImpl.(ActivityHolderBindingImpl.java:32)
at com.manojbhadane.holdy.databinding.ActivityHolderBindingImpl.(ActivityHolderBindingImpl.java:29)
at com.manojbhadane.holdy.DataBinderMapperImpl.getDataBinder(DataBinderMapperImpl.java:40)
at androidx.databinding.MergedDataBinderMapper.getDataBinder(MergedDataBinderMapper.java:74)
at androidx.databinding.DataBindingUtil.bind(DataBindingUtil.java:199)
at androidx.databinding.DataBindingUtil.bindToAddedViews(DataBindingUtil.java:327)
at androidx.databinding.DataBindingUtil.setContentView(DataBindingUtil.java:306)
at androidx.databinding.DataBindingUtil.setContentView(DataBindingUtil.java:284)
at com.manojbhadane.holdy.HolderActivity.onCreate(HolderActivity.java:40)
at android.app.Activity.performCreate(Activity.java:6666)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2677)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2789)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6251)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1075)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

This error come after update appcompact to androidx and update to databinding

you do this type of coding for databinding in mainActivity
ActivityMainBinding dataBinding = DataBindingUtil.setContentView(this, R.layout.activity_main);

but i don't do this type of coding
please solve that issue, or give some alternate

@manojbhadane
Copy link
Owner

Added some fix.. check if its works for you or not
Please update dependancy

implementation 'com.github.manojbhadane:Holdy:v1.6.1

@rajam1215
Copy link
Author

@manojbhadane
thanks for reply, i check in 5 minutes and revert you. please feel free to read my overview.

@rajam1215
Copy link
Author

rajam1215 commented May 3, 2019

@manojbhadane
It is working, thanks for solution.

but i want to ask it is necessary, convert project in appComapct to androidx or enable data binding in gradle.

or library work without this type of stuff in newer version.

@manojbhadane
Copy link
Owner

Not required i think.

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