React-native-fast-image: Cannont find symbol @NonNull or @CheckResult when upgrading to AndroidX

Created on 12 Dec 2018  路  2Comments  路  Source: DylanVann/react-native-fast-image

I'm on the 5.1.1 version of the library

Android is moving over to AndroidX so I went ahead and made the switch.

I get this build error:

> Task :react-native-fast-image:compileReleaseJavaWithJavac FAILED
Note: [2] Wrote GeneratedAppGlideModule with: [com.bumptech.glide.integration.okhttp3.OkHttpLibraryGlideModule, com.dylanvann.fastimage.FastImageOkHttpProgressGlideModule]
/Users/ezinator/Desktop/client/node_modules/react-native-fast-image/android/build/generated/source/apt/release/com/dylanvann/fastimage/GlideOptions.java:6: error: package android.support.annotation does not exist
import android.support.annotation.CheckResult;
                                 ^
/Users/ezinator/Desktop/client/node_modules/react-native-fast-image/android/build/generated/source/apt/release/com/dylanvann/fastimage/GlideOptions.java:7: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
/Users/ezinator/Desktop/client/node_modules/react-native-fast-image/android/build/generated/source/apt/release/com/dylanvann/fastimage/GlideRequest.java:8: error: package android.support.annotation does not exist
import android.support.annotation.CheckResult;
                                 ^
/Users/ezinator/Desktop/client/node_modules/react-native-fast-image/android/build/generated/source/apt/release/com/dylanvann/fastimage/GlideRequest.java:9: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
/Users/ezinator/Desktop/client/node_modules/react-native-fast-image/android/build/generated/source/apt/release/com/dylanvann/fastimage/GlideRequests.java:7: error: package android.support.annotation does not exist
import android.support.annotation.CheckResult;
                                 ^
/Users/ezinator/Desktop/client/node_modules/react-native-fast-image/android/build/generated/source/apt/release/com/dylanvann/fastimage/GlideRequests.java:8: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
/Users/ezinator/Desktop/client/node_modules/react-native-fast-image/android/build/generated/source/apt/release/com/bumptech/glide/GeneratedRequestManagerFactory.java:4: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
/Users/ezinator/Desktop/client/node_modules/react-native-fast-image/android/build/generated/source/apt/release/com/bumptech/glide/GeneratedAppGlideModuleImpl.java:4: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
/Users/ezinator/Desktop/client/node_modules/react-native-fast-image/android/build/generated/source/apt/release/com/dylanvann/fastimage/GlideOptions.java:48: error: cannot find symbol
  @CheckResult
   ^
  symbol:   class CheckResult
  location: class GlideOptions
/Users/ezinator/Desktop/client/node_modules/react-native-fast-image/android/build/generated/source/apt/release/com/dylanvann/fastimage/GlideOptions.java:49: error: cannot find symbol
  @NonNull
   ^
  symbol:   class NonNull
  location: class GlideOptions
/Users/ezinator/Desktop/client/node_modules/react-native-fast-image/android/build/generated/source/apt/release/com/dylanvann/fastimage/GlideOptions.java:57: error: cannot find symbol
  @CheckResult
   ^
  symbol:   class CheckResult
  location: class GlideOptions
/Users/ezinator/Desktop/client/node_modules/react-native-fast-image/android/build/generated/source/apt/release/com/dylanvann/fastimage/GlideOptions.java:58: error: cannot find symbol
  @NonNull
   ^
  symbol:   class NonNull
  location: class GlideOptions
/Users/ezinator/Desktop/client/node_modules/react-native-fast-image/android/build/generated/source/apt/release/com/dylanvann/fastimage/GlideOptions.java:66: error: cannot find symbol
  @CheckResult

android.support.annotation I believe should be switched over to androidx.annotation:annotation:1.0.0

I'm not sure if this is a react-native-fast-image issue or a glide issue, or even an issue in my own code.

In app level build.gradle I set ext.glideVersion = 4.8.0 as per this repositiories build.gradle but that doesnt seem to help

Most helpful comment

All 2 comments

followed the README for Glide being already in project and it got past this

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Andarius picture Andarius  路  3Comments

OmarBasem picture OmarBasem  路  3Comments

Aligertor picture Aligertor  路  3Comments

baba43 picture baba43  路  3Comments

guihouchang picture guihouchang  路  4Comments