px-android icon indicating copy to clipboard operation
px-android copied to clipboard

Newer versions change the theme of the application and conflict with the material design library

Open ivessambex opened this issue 5 years ago • 3 comments
trafficstars

I'm using material library 'com.google.android.material:material:1.2.1' when I add Mercado Pago library 'com.mercadopago.android.px:checkout:4.53.1' the application crash when start with this error: The style on this component requires your app theme to be Theme.MaterialComponents (or a descendant). But my theme is already child of Theme.MaterialComponents.Light.NoActionBar I need to use this material theme for use the widgets of library, this error ocurred only when i use new versions of library, until version 4.31.0 works fine

ivessambex avatar Nov 08 '20 16:11 ivessambex

We've been hitting the same issue. This is the only library that I have used so far that simply changes themes of my application.

objectivecosta avatar Nov 24 '20 13:11 objectivecosta

Update: this seems to be related to MercadoPago using the old MaterialComponents 1.0.0 (as seen in gradle.properties). Any plans to update this? This seems to be breaking any apps that use newer versions of the library. @guchito9 @cgaggino?

objectivecosta avatar Nov 24 '20 13:11 objectivecosta

Hi, we have exactly the same issue. We have this dependency on our project: com.google.android.material:material:1.0.0, and when added Mercado Pago library, the application showed an error in this line, which is in the OnCreate method from the first Activity in our application:

Objects.requireNonNull(getSupportActionBar()).hide();

If I delete that line, the application works but the style applied to all our applications is changed for another. I did the same action as @FeijaoNativo, I test version after version to get the version which I work without that problem and it was the 4.31.0

Could there be any way to avoid that conflict?

BrayanJCG avatar Dec 21 '20 18:12 BrayanJCG