Coder Social home page Coder Social logo

Binding AAR library that contains AndroidX cause "NoClassDefFoundError" for "androidx/lifecycle/LifecycleOwner" about androidx HOT 14 CLOSED

sgong-pdftron avatar sgong-pdftron commented on June 16, 2024 2
Binding AAR library that contains AndroidX cause "NoClassDefFoundError" for "androidx/lifecycle/LifecycleOwner"

from androidx.

Comments (14)

moljac avatar moljac commented on June 16, 2024 1

@sgong-pdftron Thanks for feedback.

Would it be possible if you could give it another try? Thanks!

Of course. Just, we are (I am) trying to launch AndroidX release 1st. I hope I wll come to this issue in next few days.

@matheussouza97 Thanks for the feedback. Appreciated.

from androidx.

moljac avatar moljac commented on June 16, 2024 1

@sgong-pdftron No need to be sorry. Git happens.

I'll check that.

from androidx.

rubenmarrufo avatar rubenmarrufo commented on June 16, 2024

Hi! Is there any known workaround for this? Thanks!

from androidx.

matheusouz avatar matheusouz commented on June 16, 2024

Any news? My binding is not working because of this error.

from androidx.

moljac avatar moljac commented on June 16, 2024

LifecycleOwner is ILifecycleOwner in c# and it is surfaced in preview3.

https://developer.android.com/reference/androidx/lifecycle/LifecycleOwner

Do you have maybe linker turned on?

Can you give more info on proguard rules?

from androidx.

sgong-pdftron avatar sgong-pdftron commented on June 16, 2024

@moljac I've included a project that you can reproduce this issue in the first post. Were you able to try that?

from androidx.

moljac avatar moljac commented on June 16, 2024

@sgong-pdftron
I tried your previous sample, but had to remove (unload) some projects . and was not sure if that was completely OK.
And BTW I really did not have that much time.

if you have something smaller it would be appreciated.

from androidx.

moljac avatar moljac commented on June 16, 2024

@sgong-pdftron Can you try preview03 of the packages that was released yesterday.

from androidx.

sgong-pdftron avatar sgong-pdftron commented on June 16, 2024

@moljac Thanks for your reply!

I've just tried preview03 however the exact same error is still present.

The sample project does contain a number of projects however the only projects relevant is the "PDFNetAndroid" and "PDFViewCtrlTools" project. You can unload everything other than these 2 projects.

Clean and build "PDFViewCtrlTools" project will generate the error. Would it be possible if you could give it another try? Thanks!

from androidx.

matheusouz avatar matheusouz commented on June 16, 2024

I tried here and got the same error. :(

from androidx.

moljac avatar moljac commented on June 16, 2024

@sgong-pdftron
Can you please gist ProjectReferences from PDFViewCtrlTools, please?

You have mixture of legacy Android.Support and AndroidX. Why? I have no idea. GooglePlayServices are not AndroidX ready yet, but you are not using those.

from androidx.

sgong-pdftron avatar sgong-pdftron commented on June 16, 2024

@moljac sorry about that. Here is the updated project, all support lib is removed from PDFViewCtrlTools:

project:
https://pdftron.s3.amazonaws.com/custom/external/xamarin/androidx/to-Xamarin-v2.zip
log:
https://pdftron.s3.amazonaws.com/custom/external/xamarin/androidx/androidx-error2.txt

from androidx.

moljac avatar moljac commented on June 16, 2024

@sgong-pdftron
Sorry, but unable to reproduce and I don't have time to dive deeper into those bindings.

  1. uncommented 2 Native*.cs classes to shyt up compiler
  2. there still are issues with bindings (type conversion pdf.Tools - tools.aar)

Other suspicious stuff:

  1. bunch of Xamarin.AndroidX in libs\android\ folder. Stale versions might cause this issue

And please: do not zip packages folders. Those should be restored.

Closing this one. If issue persist (WITH SMALLER REPRO SAMPLE) reopen new issue please.

from androidx.

sgong-pdftron avatar sgong-pdftron commented on June 16, 2024

Thanks for the tips!

I was able to get it working again by start fresh, i.e. create a new binding project and add in androidx dependencies and other metadata in the new binding project. With preview-6 the binding project is working again! Thanks for all the help!

from androidx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.