folofse / androw

Shadows in React Native for Android
97 stars 16 forks source link

annotation issue #8

Closed ydv0121 closed 5 years ago

ydv0121 commented 5 years ago

how to resolve this..getting this since morning in my react native project after i added android.useAndroidX=true android.enableJetifier=true

to my gradle.properties

Screenshot 2019-06-18 at 11 03 31 AM

folofse commented 5 years ago

Make sure you have this in dependencies in your android project /app/build.gradle implementation 'com.android.support:support-annotations:28.0.0'

Or if you use androidX you can change the import to import androidx.annotation.NonNull; instead.

ydv0121 commented 5 years ago

Make sure you have this in dependencies in your android project /app/build.gradle implementation 'com.android.support:support-annotations:28.0.0'

Or if you use androidX you can change the import to import androidx.annotation.NonNull; instead.

yes i am using com.android.support:support-annotations:28.0.0 .. and where to change import import androidx.annotation.NonNull;???

ydv0121 commented 5 years ago

actually after updated play-service in reacet-native run-android i am getting this error..that's why i put this android.useAndroidX=true android.enableJetifier=true

Screenshot 2019-06-18 at 10 25 32 AM

folofse commented 5 years ago

Ok, I see

You can test to replace import android.support.annotation.NonNull; with import androidx.annotation.NonNull;

ydv0121 commented 5 years ago

ok thank you error is gone from react-native-androw but got many errors from other library after add this in gadle.properties android.useAndroidX=true android.enableJetifier=true

do you know how to remove androidx from my entire react native project

actually after updated play-service in reacet-native run-android i am getting this error..that's why i put this android.useAndroidX=true android.enableJetifier=true

Screenshot 2019-06-18 at 10 25 32 AM

folofse commented 5 years ago

I believe you can remove these

android.useAndroidX=true
android.enableJetifier=true

Or set them to false

android.useAndroidX=false
android.enableJetifier=false
ydv0121 commented 5 years ago

android.useAndroidX=false android.enableJetifier=false

ohk let me try..what about this -> tools:replace="android:appComponentFactory" terminal show this to add this in in mainfest.. do i need to put this or not?

folofse commented 5 years ago

I'm not sure, but after you have removed the useAndroidX you can try to run "refactor>migrate app to app compat" in Android Studio

ydv0121 commented 5 years ago

I'm not sure, but after you have removed the useAndroidX you can try to run "refactor>migrate app to app compat" in Android Studio

is it cause anything else?

folofse commented 5 years ago

I think it just changes all imports from androidx to android app compat..

ydv0121 commented 5 years ago

ohk let me try..i removed this import androidx.annotation.NonNull; form react-native androw