title: Converting an existing project from Eclipse to Gradle in Android Studio
body: <p>I found an open source project I wanted to work on but I'm having trouble setting up the initial configuration. The project seems to have been written in Eclipse and I'm trying to get it to work with Android Studio.  After being through a number of errors, I'm finally stuck on the following error seen in the configuration menu before I run.</p>
  
  <pre><code>AndroidManifest.XML doesn't exist or has the incorrect root tag
  </code></pre>
  
  <p>I found a number of answers that suggest like <a href="https://stackoverflow.com/questions/17424135/android-studio-android-manifest-doesnt-exists-or-has-incorrect-root-tag">this</a> that suggest I  use the <code>sync project with Gradle</code> command but my project wasn't setup with Gradle because I'm building on someone else's project. This is my first time using Android Studio so my following attempt to fix this might not be great. I decided to try to make the project a Gradle project by adding my own <code>build.gradle</code> and <code>settings.gradle</code> files. My layout looks like this:</p>
  
  <p>top level:</p>
  
  <p><img src="https://i.stack.imgur.com/7DbKe.png" alt="top level"></p>
  
  <p>inside java folder:</p>
  
  <p><img src="https://i.stack.imgur.com/ItcKt.png" alt="enter image description here"></p>
  
  <p>I tried to copy working example of the build and settings Gradle files. My <code>settings.gradle</code> contains the following:</p>
  
  <pre><code>include ':'
  </code></pre>
  
  <p>My top level <code>build.gradle</code> contains:</p>
  
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  buildscript {
      repositories {
          mavenCentral()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:0.11.+'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
          //compile project(":")
      }
  }
  
  allprojects {
      repositories {
          mavenCentral()
      }
  }
  </code></pre>
  
  <p>My java level <code>build.gradle</code> contains:</p>
  
  <pre><code>apply plugin: 'android'
  
  android {
      compileSdkVersion 20
      buildToolsVersion "17.0.0"
  
      defaultConfig {
          applicationId "org.pocketworkstation.pckeyboard"
          minSdkVersion 8
          targetSdkVersion 19
          versionCode 1037
          versionName "v1.37"
      }
      buildTypes {
          release {
              runProguard false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
      sourceSets {
          main {
              manifest.srcFile 'AndroidManifest.xml'
              java.srcDirs = ['src']
              res.srcDirs = ['res']
              jni.srcDirs = ['jni']
          }
          androidTest.setRoot('tests')
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
  }
  </code></pre>
  
  <p>And because I think it might be important, my project structure modules:</p>
  
  <p><img src="https://i.stack.imgur.com/g4SyN.png" alt=" project structure modules"></p>
  
  <p>Trying to synchronize at the moment doesn't generate any word so I assume it's okay but that's a big assumption. Any ideas what I have to change?</p>