title: Error after installing react-native-navigation
body: <blockquote>
    <p>I have installed react native navigation following this link:</p>
    
    <p><a href="https://wix.github.io/react-native-navigation/#/installation-android" rel="nofollow noreferrer">https://wix.github.io/react-native-navigation/#/installation-android</a></p>
    
    <p>But I am getting errors after running <strong>react-native run-android</strong>
    command.</p>
    
    <p>The Error is below:</p>
  </blockquote>
  
  <pre><code>&gt; Task :react-native-navigation:compileDebugJavaWithJavac
  Note: Some input files use or override a deprecated API.
  Note: Recompile with -Xlint:deprecation for details.
  Note: Some input files use unchecked or unsafe operations.
  Note: Recompile with -Xlint:unchecked for details.
  
  &gt; Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
  D8: Program type already present: android.support.design.widget.CoordinatorLayout$Behavior
  
  
  FAILURE: Build failed with an exception.
  </code></pre>
  
  <p>I have tried gradlew clen command after installing react native navigation. build was successful. also tried <strong>multiDexEnabled true</strong>, but not working. <strong>I am new to react native, please help me with this error.</strong></p>
  
  <blockquote>
    <p>My MainApplication.java file looks like this:</p>
  </blockquote>
  
  <p>package com.prabhujidroid;</p>
  
  <pre><code>import android.app.Application;
  
  import com.facebook.react.ReactApplication;
  import com.facebook.react.ReactNativeHost;
  import com.facebook.react.ReactPackage;
  import com.facebook.react.shell.MainReactPackage;
  import com.facebook.soloader.SoLoader;
  
  import java.util.Arrays;
  import java.util.List;
  
  import com.reactnativenavigation.NavigationApplication;
  
  public class MainApplication extends NavigationApplication {
  
      @Override
       public boolean isDebug() {
           // Make sure you are using BuildConfig from your own application
           return BuildConfig.DEBUG;
       }
  
       protected List&lt;ReactPackage&gt; getPackages() {
           // Add additional packages you require here
           // No need to add RnnPackage and MainReactPackage
           return Arrays.&lt;ReactPackage&gt;asList(
               // eg. new VectorIconsPackage()
               //new VectorIconsPackage()
           );
       }
  
       @Override
       public List&lt;ReactPackage&gt; createAdditionalReactPackages() {
           return getPackages();
       }
  
       @Override
      public String getJSMainModuleName() {
          return "index";
      }
  }
  </code></pre>
  
  <blockquote>
    <p>build.gradle file which is inside android folder looksmlike
    this(android/build.gradle)</p>
  </blockquote>
  
  <pre><code>buildscript {
      ext {
          buildToolsVersion = "27.0.3"
          minSdkVersion = 21
          compileSdkVersion = 27
          targetSdkVersion = 26
          supportLibVersion = "27.1.1"
      }
      repositories {
          jcenter()
          google()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.1.4'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          mavenLocal()
          jcenter()
          maven {
              // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
              url "$rootDir/../node_modules/react-native/android"
          }
          google()
      }
  }
  
  
  task wrapper(type: Wrapper) {
      gradleVersion = '4.4'
      distributionUrl = distributionUrl.replace("bin", "all")
  }
  </code></pre>
  
  <blockquote>
    <p>build.gradle file which is inside android/app folder looks like this:</p>
  </blockquote>
  
  <pre><code>apply plugin: "com.android.application"
  
  import com.android.build.OutputFile
  
  project.ext.react = [
      entryFile: "index.js"
  ]
  
  apply from: "../../node_modules/react-native/react.gradle"
  
  def enableSeparateBuildPerCPUArchitecture = false
  
  /**
   * Run Proguard to shrink the Java bytecode in release builds.
   */
  def enableProguardInReleaseBuilds = false
  
  android {
      // compileSdkVersion rootProject.ext.compileSdkVersion
      // buildToolsVersion rootProject.ext.buildToolsVersion
  
      compileSdkVersion 25
      buildToolsVersion "25.0.1"
  
      defaultConfig {
          multiDexEnabled true
          applicationId "com.prabhujidroid"
          minSdkVersion rootProject.ext.minSdkVersion
          targetSdkVersion rootProject.ext.targetSdkVersion
          versionCode 1
          versionName "1.0"
          ndk {
              abiFilters "armeabi-v7a", "x86"
          }
      }
      splits {
          abi {
              reset()
              enable enableSeparateBuildPerCPUArchitecture
              universalApk false  // If true, also generate a universal APK
              include "armeabi-v7a", "x86"
          }
      }
      buildTypes {
          release {
              minifyEnabled enableProguardInReleaseBuilds
              proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
          }
      }
      // applicationVariants are e.g. debug, release
      applicationVariants.all { variant -&gt;
          variant.outputs.each { output -&gt;
              // For each separate APK per architecture, set a unique version code as described here:
              // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
              def versionCodes = ["armeabi-v7a":1, "x86":2]
              def abi = output.getFilter(OutputFile.ABI)
              if (abi != null) {  // null for the universal-debug, universal-release variants
                  output.versionCodeOverride =
                          versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
              }
          }
      }
  }
  
  dependencies {
      implementation fileTree(dir: "libs", include: ["*.jar"])
      implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
      implementation "com.facebook.react:react-native:+"  // From node_modules
  
      compile fileTree(dir: "libs", include: ["*.jar"])
      compile "com.android.support:appcompat-v7:23.0.1"
      compile "com.facebook.react:react-native:+"
      compile project(':react-native-navigation')
  }
  
  // Run this once to be able to run the application with BUCK
  // puts all compile dependencies into folder libs for BUCK to use
  task copyDownloadableDepsToLibs(type: Copy) {
      from configurations.compile
      into 'libs'
  }
  </code></pre>
  
  <blockquote>
    <p><strong>Package,json file goes here.</strong></p>
  </blockquote>
  
  <pre><code>    {
    "name": "rn-course",
    "version": "0.1.0",
    "private": true,
    "devDependencies": {
      "babel-preset-react-native-stage-0": "^1.0.1",
      "jest": "^23.6.0",
      "jest-react-native": "^18.0.0",
      "react-test-renderer": "16.3.1"
    },
    "scripts": {
      "start": "react-native start",
      "android": "react-native run-android",
      "ios": "react-native run-ios",
      "test": "jest"
    },
    "jest": {
      "preset": "react-native"
    },
    "dependencies": {
      "react": "16.3.1",
      "react-native": "~0.55.2",
      "react-native-navigation": "^1.1.486"
    }
  }
  </code></pre>