Working Android example
This commit is contained in:
parent
a98401d47b
commit
b50bfb1fc8
@ -133,6 +133,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':react-native-appmetrica')
|
||||
compile fileTree(dir: "libs", include: ["*.jar"])
|
||||
compile "com.android.support:appcompat-v7:23.0.1"
|
||||
compile "com.facebook.react:react-native:+" // From node_modules
|
||||
|
@ -3,6 +3,7 @@ package com.rnappmetrika;
|
||||
import android.app.Application;
|
||||
|
||||
import com.facebook.react.ReactApplication;
|
||||
import com.aandrosov.AppMetrica.AppMetricaPackage;
|
||||
import com.facebook.react.ReactNativeHost;
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.shell.MainReactPackage;
|
||||
@ -22,7 +23,8 @@ public class MainApplication extends Application implements ReactApplication {
|
||||
@Override
|
||||
protected List<ReactPackage> getPackages() {
|
||||
return Arrays.<ReactPackage>asList(
|
||||
new MainReactPackage()
|
||||
new MainReactPackage(),
|
||||
new AppMetricaPackage()
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -1,3 +1,5 @@
|
||||
rootProject.name = 'RNAppMetrika'
|
||||
include ':react-native-appmetrica'
|
||||
project(':react-native-appmetrica').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-appmetrica/android')
|
||||
|
||||
include ':app'
|
||||
|
@ -20,7 +20,7 @@ class Page2 extends React.PureComponent {
|
||||
}
|
||||
|
||||
handlePress() {
|
||||
appNavigator.push({ id: 'page2' });
|
||||
appNavigator.pop();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user