-
Notifications
You must be signed in to change notification settings - Fork 300
Manual linking Android
洪加煌 edited this page Aug 26, 2016
·
3 revisions
allprojects {
repositories {
mavenLocal()
jcenter()
+ maven {
+ url "https://jitpack.io"
+ }
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$projectDir/../../node_modules/react-native/android"
}
}
}
dependencies {
+ compile project(':react-native-spinkit')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
}
include ':app'
+ include ':react-native-spinkit'
+ project(':react-native-spinkit').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-spinkit/android')
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
+ import com.react.rnspinkit.RNSpinkitPackage;
import java.util.Arrays;
import java.util.List;
public class MainApplication extends Application implements ReactApplication {
...
/**
* A list of packages used by the app. If the app uses additional views
* or modules besides the default ones, add more packages here.
*/
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
+ new RNSpinkitPackage()
);
}
}