mirror of
https://github.com/status-im/react-native-fast-image.git
synced 2025-02-24 12:18:12 +00:00
React Native bumped the version of the Android Gradle Plugin to v3 which uses the newer Gradle dependency configurations `implementation` and `api` which make `compile` obsolete.
1.3 KiB
1.3 KiB
Installation (Manual)
iOS
- In Xcode:
- Add
FastImage.xcodeproj
to Libraries. - Add
libFastImage.a
to Link Binary With Libraries under Build Phases. - More info and screenshots.
- Add
Android
- Edit
android/settings.gradle
rootProject.name = 'MyApp'
include ':app'
+ include ':react-native-fast-image'
+ project(':react-native-fast-image').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fast-image/android')
- Edit
android/app/build.gradle
apply plugin: 'com.android.application'
android {
...
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
+ implementation project(':react-native-fast-image')
}
- Edit
android/app/src/main/java/.../MainApplication.java
package com.myapp;
+ import com.dylanvann.fastimage.FastImageViewPackage;
....
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage()
+ ,new FastImageViewPackage()
);
}
}