Fix Android debugging doc

Summary:
I've tried to debug my Android app using Stetho as is documented [here](https://facebook.github.io/react-native/docs/debugging.html#debugging-with-stetho-http-facebook-github-io-stetho-on-android), but, it turns out the documentation is wrong, because if we pass `Bundle savedInstanceState` to `onCreate` method, the app crashes itself, so I've updated the documentation accordingly.
Closes https://github.com/facebook/react-native/pull/11796

Differential Revision: D4437893

Pulled By: hramos

fbshipit-source-id: fbb026e4480ae08128404ed2cf4ddb00a35f7d7b
This commit is contained in:
AgtLucas 2017-01-19 14:06:54 -08:00 committed by Facebook Github Bot
parent 829019400a
commit dd8231ad63
1 changed files with 4 additions and 5 deletions

View File

@ -106,7 +106,6 @@ The debugger will receive a list of all project roots, separated by a space. For
2. In ```android/app/src/main/java/com/{yourAppName}/MainApplication.java```, add the following imports:
```java
import android.os.Bundle;
import com.facebook.react.modules.network.ReactCookieJarContainer;
import com.facebook.stetho.Stetho;
import okhttp3.OkHttpClient;
@ -117,8 +116,8 @@ The debugger will receive a list of all project roots, separated by a space. For
3. In ```android/app/src/main/java/com/{yourAppName}/MainApplication.java``` add the function:
```java
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
public void onCreate() {
super.onCreate();
Stetho.initializeWithDefaults(this);
OkHttpClient client = new OkHttpClient.Builder()
.connectTimeout(0, TimeUnit.MILLISECONDS)