-
Notifications
You must be signed in to change notification settings - Fork 8
Step 4: Configuring the Android project (if needed)
Ioannis Kokkinidis edited this page Oct 20, 2016
·
7 revisions
-
Go to your settings.gradle and add the following lines after
//somewhere after include ':app' add the following 2 lines include ':react-native-bugsnag' project(':react-native-bugsnag').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-bugsnag/android')
-
Go to your app/build.gradle and add the following line in the end:
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.0.1' compile 'com.facebook.react:react-native:+' //...whatever code compile project(':react-native-bugsnag') //<--Add this line }
-
Go to your
AndroidManifest.xml
and add the following line within the application tag replacingYOUR_API_KEY
:<meta-data android:name="com.bugsnag.android.API_KEY" android:value="YOUR_API_KEY"/>
Example: here
-
Go to your
MainApplication.java
and add the following code:import com.pintersudoplz.rnbugsnag.RNBugsnagPackage;
and then within your
getPackages
check to see if the line with the comment is there. If not add it.@Override protected List<ReactPackage> getPackages() { // ...whatever code return Arrays.<ReactPackage>asList( new MainReactPackage(), new RNBugsnagPackage() //add this line ); }