Vydia / react-native-background-upload

Upload files in your React Native app even while it's backgrounded. Supports Android and iOS, including camera roll assets.
MIT License
735 stars 335 forks source link

Unable to build with Androidx #180

Closed ahmedurrehman closed 4 years ago

ahmedurrehman commented 4 years ago

When we add

android.useAndroidX=true
android.enableJetifier=true

in gradle.properties

react-native-background-upload compilation fails

.../node_modules/react-native-background-upload/android/src/main/java/com/vydia/UploaderModule.java:4: error: package android.support.annotation does not exist
import android.support.annotation.Nullable;
.../node_modules/react-native-background-upload/android/src/main/java/com/vydia/UploaderModule.java:52: error: cannot find symbol
  private void sendEvent(String eventName, @Nullable WritableMap params) {
                                            ^
  symbol:   class Nullable
  location: class UploaderModule

2 errors

patrickleemsantos commented 4 years ago

Just run npx jetify

TaiPhamDuc commented 4 years ago

Just run npx jetify

Thanks, it works for me :)