konmik / nucleus

Nucleus is an Android library, which utilizes the Model-View-Presenter pattern to properly connect background tasks with visual parts of an application.
MIT License
1.97k stars 253 forks source link

NucleusActionBarActivity with support library 26 #147

Closed aralizer closed 7 years ago

aralizer commented 7 years ago

Hi,

I've recently updated my support library to version 26.0.1 which does not include the deprecated ActionBarActivity class. This causes an error while creating a release APK file saying that the NucleusActionBarActivity can't be compiled since it has unknown method references:

Warning:nucleus.view.NucleusActionBarActivity: can't find referenced method 'boolean isChangingConfigurations()' in program class nucleus.view.NucleusActionBarActivity

I've tried removing only this class with gradle's 'exclude', but with no success. So currently I'm adding the sources without the problematic class directly into my app sources...

I think this class should be removed from nucleus since it extends a class that has been removed from the android support library.

TWiStErRob commented 7 years ago

Don't exclude in Gradle, add

-dontwarn nucleus.view.NucleusActionBarActivity

to your ProGuard config. -- https://stackoverflow.com/a/23944940/253468

And make sure you're not using this class in your app.

aralizer commented 7 years ago

It worked, thanks.

TWiStErRob commented 7 years ago

@konmik I think it's still a valid request to remove that class from your lib.

konmik commented 7 years ago

Past weekend I tried to reproduce this issue and failed. It relies on usage of beta dependencies as I understand. I can't make library depending on them, when everything will become final I'll update both (rx1 and rx2) versions.

TWiStErRob commented 7 years ago

@konmik Oreo (8/26) was released in August. API 26 support had 4 stable releases already, what do you mean by "become final"?

sreejithraman commented 7 years ago

i used 26.0.1 and didn't run into this issue... should i be concerned and are there any updates on this?

konmik commented 7 years ago

You're welcome to send a PR. :)

Or wait till I will make the second attempt. I have some time this weekend.

konmik commented 7 years ago

image

konmik commented 7 years ago

Oh, I see: ActionBarActivity !

TWiStErRob commented 7 years ago

:) Yes, they renamed it a while ago, by extends, and deprecated the old one.

TWiStErRob commented 7 years ago

Did you see the repro PR?

konmik commented 7 years ago

Yeah, I saw it, thanks! :) Gradle and maven repo are trying to confuse me, but I'm not giving up! :D Hope to update it today finally.

konmik commented 7 years ago

Done! NucleusActionBarActivity removed, library version bumped, it will be available on maven central in several hours.