0

The project uses Android support libraries such as v4, v7, etc., And a dependant library uses AndroidX dependencies. And the app crashes when the dependant library uses the AndroidX class.

java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/content/ContextCompat;

4
  • Migrate to androidx: developer.android.com/jetpack/androidx/migrate#migrate Commented Aug 8, 2019 at 10:06
  • migrate old project to androidx use new material themes and add other dependencies Commented Aug 8, 2019 at 10:14
  • Yes, migration is an easy solution, but why does it crash? Is AndroidX not compatible with support libraries? Commented Aug 8, 2019 at 10:23
  • AndroidX contains support librairies. So you have conflicts with both librairies.
    – Johann67
    Commented Aug 8, 2019 at 12:18

1 Answer 1

0

Convert all the support libraries to androidX and in every class and xml file convert the imports and views to androidX.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.