Android builds failing, latest Androidx libraries are not recognised

react-native
#1

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

0 Likes

#2

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.

0 Likes

#3

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.

0 Likes

#4

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.

0 Likes

#5

Correct. It still gets the old dependencies

0 Likes

#6

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

0 Likes

closed #7

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

0 Likes