Updated docs for next

This commit is contained in:
Website Deployment Script
2016-10-25 13:42:36 +00:00
parent 5f1541d5da
commit 3ee4a7caaf
3 changed files with 4 additions and 4 deletions
@@ -22,7 +22,7 @@ dependencies <span class="token punctuation">{</span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token punctuation">}</span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></div><h4><a class="anchor" name="4-making-3rd-party-modules-use-your-fork"></a>4. Making 3rd-party modules use your fork <a class="hash-link" href="docs/android-building-from-source.html#4-making-3rd-party-modules-use-your-fork">#</a></h4><p>If you use 3rd-party React Native modules, you need to override their dependencies so that they don&#x27;t bundle the pre-compiled library. Otherwise you&#x27;ll get an error while compiling - <code>Error: more than one library with package name &#x27;com.facebook.react&#x27;</code>.</p><p>Modify your <code>android/app/build.gradle</code> and replace <code>compile project(&#x27;:react-native-custom-module&#x27;)</code> with:</p><div class="prism language-javascript"><span class="token function">compile<span class="token punctuation">(</span></span><span class="token function">project<span class="token punctuation">(</span></span><span class="token string">&#x27;:react-native-custom-module&#x27;</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></div><h4><a class="anchor" name="4-making-3rd-party-modules-use-your-fork"></a>4. Making 3rd-party modules use your fork <a class="hash-link" href="docs/android-building-from-source.html#4-making-3rd-party-modules-use-your-fork">#</a></h4><p>If you use 3rd-party React Native modules, you need to override their dependencies so that they don&#x27;t bundle the pre-compiled library. Otherwise you&#x27;ll get an error while compiling - <code>Error: more than one library with package name &#x27;com.facebook.react&#x27;</code>.</p><p>Modify your <code>android/app/build.gradle</code>, and add:</p><div class="prism language-javascript">configurations<span class="token punctuation">.</span>all <span class="token punctuation">{</span>
exclude group<span class="token punctuation">:</span> <span class="token string">&#x27;com.facebook.react&#x27;</span><span class="token punctuation">,</span> module<span class="token punctuation">:</span> <span class="token string">&#x27;react-native&#x27;</span>
<span class="token punctuation">}</span></div><h2><a class="anchor" name="building-from-android-studio"></a>Building from Android Studio <a class="hash-link" href="docs/android-building-from-source.html#building-from-android-studio">#</a></h2><p>From the Welcome screen of Android Studio choose &quot;Import project&quot; and select the <code>android</code> folder of your app.</p><p>You should be able to use the <em>Run</em> button to run your app on a device. Android Studio won&#x27;t start the packager automatically, you&#x27;ll need to start it by running <code>npm start</code> on the command line.</p><h2><a class="anchor" name="additional-notes"></a>Additional notes <a class="hash-link" href="docs/android-building-from-source.html#additional-notes">#</a></h2><p>Building from source can take a long time, especially for the first build, as it needs to download ~200 MB of artifacts and compile the native code. Every time you update the <code>react-native</code> version from your repo, the build directory may get deleted, and all the files are re-downloaded. To avoid this, you might want to change your build directory path by editing the <code>~/.gradle/init.gradle</code> file:</p><div class="prism language-javascript">gradle<span class="token punctuation">.</span>projectsLoaded <span class="token punctuation">{</span>
rootProject<span class="token punctuation">.</span>allprojects <span class="token punctuation">{</span>
File diff suppressed because one or more lines are too long
+2 -2
View File
File diff suppressed because one or more lines are too long