Android builds failing, latest Androidx libraries are not recognised

Hi, i have upgraded my react-native app from react-native 58.x.x, to 63.x.x and even though i have updated also all the dependencies and libraries, the build fails with errors like this:

/bitrise/src/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/ReflectionHelper.java:3: error: package android.support.annotation does not exist
import android.support.annotation.Nullable;

And the datepicker lib is v3.0.6, which is 100% on Androidx.

We used to have a caching for the node_modules, but i have removed this step on workflow

I’m not familiar with React native but the title of this issue does not seem to match the body.

android.support…

is the opposite of

latest Androidx libraries

It’s the old Android support library. And this one is not recognized.

The app used to use the old Android, then i did the upgrade on the Androidx, but it still retrieves the old Android libraries, which means i does not recognise the Androidx libraries.

Ah, OK so we are using different definitions of “recognise” word :slight_smile:

I meant that:

package android.support.annotation does not exist

means that it is not recognised.

Anyway it seems that the problem is not about “recognition” whatever it means. But your project (or libraries you are using) still contain old (Android support related) code. They are not migrated to AndroidX.

Correct. It still gets the old dependencies

Hi @nikos_rapousis
Can you please send us the build URL with Support Access Enabled so that we can take a look at your project?

Thanks
Chaitanya

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.