[Android] Warning: Native component for "FastImageView" does not exist [SOLVED]
See original GitHub issueI found myself with this issue and I was able to fix it for iOS as it’s explained in #51
However, I didn’t find anything for Android… so I had to fix it myself.
I’m writing down here what was the solution for me in order to help others with the same issue.
It seems that react-native link does not do his work properly sometimes, so there was a missed line in android/app/src/main/java/com/PROJECT_FOLDER/MainApplication.java
you must add
return Arrays.<ReactPackage>asList(
(.... all your packages list)
new FastImageViewPackage()
Be sure that previously you have imported the library at the top of the file
import com.dylanvann.fastimage.FastImageViewPackage;
In case this solution doesn’t work for you, these are the files you must check:
At android/settings.gradle
add
include ':react-native-fast-image'
project(':react-native-fast-image').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fast-image/android')
At android/app/build.gradle
add
dependencies {
compile project(':react-native-fast-image')
(...all your dependencies)
Hope it helps!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top GitHub Comments
same problem
@iqqmuT Can you show me your versions and the code where you are using fastimage?