title: Android Studio - Importing Simple-Xml library
body: <p>I am going crazy with my Android Studio IDE.</p>
  
  <p>I am willing to add the Maven library simple-xml from Central (v2.7.1)</p>
  
  <ol>
  <li><p>The project compiles well</p></li>
  <li><p>Gradle has the lib dependency in its <code>build.gradle</code>:</p>
  
  <pre><code>dependencies {
    compile 'com.android.support:appcompat-v7:18.0.0'
    compile 'org.simpleframework:simple-xml:2.7.1'
  }
  </code></pre></li>
  <li><p>Export is checked in Android Studio's Module Settings for the simple-xml lib:</p></li>
  </ol>
  
  <p>Screenshot here: <a href="https://s6.postimg.cc/xxgj56zkx/Module_Settings.png" rel="nofollow noreferrer">https://s6.postimg.cc/xxgj56zkx/Module_Settings.png</a></p>
  
  <p>And I got the Class not found when I run my app ... </p>
  
  <blockquote>
    <p>java.lang.NoClassDefFoundError: org.simpleframework.xml.core.Persister</p>
  </blockquote>
  
  <p>I am lost, It sounds like Gradle doesn't pack the lib and dependencies in the apk for some reasons ...</p>
  
  <p><strong>Edit1</strong>: my Android Studio version is 0.2.13 (latest), Gradle 0.5.+</p>
  
  <p><strong>Edit2</strong>: full build.gradle I use</p>
  
  <pre><code>buildscript {
      repositories {
          mavenCentral()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:0.5.+'
      }
  }
  apply plugin: 'android'
  
  repositories {
      mavenCentral()
  }
  
  android {
      compileSdkVersion 17
      buildToolsVersion "17.0.0"
  
      defaultConfig {
          minSdkVersion 14
          targetSdkVersion 18
      }
  }
  
  dependencies {
      compile 'com.android.support:appcompat-v7:18.0.0'
      compile 'org.simpleframework:simple-xml:2.7.1'
  }
  </code></pre>