react-native-payments icon indicating copy to clipboard operation
react-native-payments copied to clipboard

Android: package android.support.annotation does not exist

Open alex-mironov opened this issue 4 years ago • 3 comments

I'm getting on an attempt to build the app after the installation of react-native-payments. It fails in ReactNativePaymentsModule.java as there are following imports:

import android.support.annotation.Nullable;
import android.support.annotation.NonNull;
import android.app.Fragment;
import android.app.FragmentManager;
import android.support.annotation.RequiresPermission;

Errors I'm getting:

error: package android.support.annotation does not exist
error: cannot find symbol class NonNull

I'm using androidX and from what I understand Nullable is not found there.

android.useAndroidX=true
android.enableJetifier=true

My dependencies list includes:

    implementation 'com.android.support:appcompat-v7:24.1.1'
    implementation 'androidx.annotation:annotation:1.1.0'

alex-mironov avatar Feb 19 '20 17:02 alex-mironov

same issue

sergenti avatar Aug 15 '20 14:08 sergenti

Hi there! Sorry for the late reply. I just ran into this during upgrading to RN 0.63.

Try npx jetify and see if the problem goes away. I'm not really sure what it does behind the scenes but it fixed things for me.

nabilfreeman avatar Nov 03 '20 16:11 nabilfreeman

@nabilfreeman nice, thanks u :3

kigor1998 avatar Nov 19 '21 11:11 kigor1998