title: IntelliJ IDEA Phonegap ! duplicate class: org.apache.cordova.BuildConfig
body: <p>I'm runing IntelliJ IDEA 13.1.2 on Ubuntu machine.
  I'm facing with a file generated wrong structure I think. Some one already asked about this problem(), but is not solved.</p>
  
  <ol>
  <li>:~/workspace$ phonegap create mobileApp1 ... done..<br></li>
  <li>:~/workspace$ cd mobileApp1/<br></li>
  <li>:~/workspace/mobileApp1$ phonegap build android<br>
  [phonegap] adding the Android platform...<br>
  Creating Cordova project for the Android platform:<br>
  Project successfully created.<br>
  BUILD SUCCESSFUL<br>
  Total time: 5 seconds<br>
  [phonegap] successfully compiled Android app<br>
  <br></li>
  <li>Starting IntelliJ IDEA<br></li>
  <li>Import project > Select directory with existing sources<br></li>
  <li>> mobileApp1/platforms/android<br>
  on Build <br>
  Error:(4, 14) java: duplicate class: org.apache.cordova.BuildConfig <br></li>
  </ol>
  
  <p>SOLUTION<br>
  I have no reputation to post more than 2 links =)) so I deleted original links .. 
  because seems nobody helped to give some solution ..</p>
  
  <p><br>
  Edite later :
  I find few tutorials and for me was a SOLUTION : </p>
  
  <p><a href="http://saintcoder.wordpress.com/2013/05/16/create-a-phonegap-android-application-development-project-on-intellij-idea-12/" rel="nofollow">http://saintcoder.wordpress.com/2013/05/16/create-a-phonegap-android-application-development-project-on-intellij-idea-12/</a></p>
  
  <p><br>
  <a href="http://www.tricedesigns.com/2013/05/16/phonegap-android-studio/" rel="nofollow">http://www.tricedesigns.com/2013/05/16/phonegap-android-studio/</a>
  <br></p>
  
  <p>Configuring project like Android from Existing sources and www like empty module (but select target folder from disk), and Adding to SDK some feature like Android 4.0.3 and 4.2.2, solved my problem ..
  In Project Settings > Facets > I have Android (CordovaLib) checked like Library module.</p>
  
  <p>The problem is ... I use Ubuntu and Windows.. and there are some differences on the interface if IntelliJ IDEA.</p>
  
  <p>so I can't provide step-by-step tutorial, but after few experiences with: phonegap create myFirstApp, phonegap platform add android, phonegap build android ..<br>
  and few new pject in IntelliJ..
  you will see :D</p>
  
  <p>Happy coding ;)</p>