Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>EDIT</strong></p> <p>After looking at your dependencies list, it seems obvious that the problem is there. I suggest you to try to:</p> <p>1) understand why you choose to include each of those libs.</p> <p>2) understand the android architecture and build process. (maybe read <a href="https://stackoverflow.com/questions/16803343/javax-cannot-be-imported-in-my-android-app/16811778#16811778">this</a>)</p> <p>Here are a few remarks:</p> <ul> <li><p><strong>openjdk-6-b14.jar</strong> MUST be removed. You are developing an Android app and so it will run against the Android SDK. The Android SDK already define most of the classes of the openjdk (so you will have conflicts when <em>dexing</em> this jar). Additionally lot of classes in this jar are simply not <em>dexable</em> (like javax.swing.*) because they use unsupported features and don't make sence on Android.</p></li> <li><p><strong>android-4.2.2_r1.jar</strong> is a stub jar (look at the code: all methods throw an exception). This artifact is only usable the build your android code with a standard <em>javac compiler</em> (and so producing *.class file). After that, all your *.class will be <em>dexed</em> (i.e. transformed into *.dex files) by <em>android compiler</em>. At runtime, the real android-api implementation will be used (instead of this artifact).</p></li> <li><p><strong>servlet-api</strong> : it's very uncommon to need this in an android-app. It only define an API (without implementation). The implementation is usually provided by the application server (tomcat, jboss,...) in standard J2EE developement. Android-sdk don't provide an implementation for this API.</p></li> <li><p><strong>junit</strong> : usually a dependency with scope test.</p></li> <li><p><strong>httpcore</strong> (and probably also httpclient) : a common mistake on android. An old implementation of this library is included in the android-sdk. If you keep it, you will have a <em>top-level exception</em> while building your app (this exception means that you try to override a class from the android-sdk : this is not possible)</p></li> <li><p><strong>opengl-api-gl1.1-android-2.1_r1.jar</strong> : I don't know exactly what it contains, but I guess the same remark as what I wrote about android-4.2.2_r1.jar applies here.</p></li> </ul> <p><strong>END EDIT</strong></p> <blockquote> <p>So, I believe Step 5 is unnecessary</p> </blockquote> <p>No step 5 is necessary ! The <code>build.gradle</code> is where dependencies are defined... so if AndroidStudio don't update this file for you : do it by hand.</p> <p>After that, you may need to reimport the project from gradle files (find the reimport button on top of the <em>gradle view</em> on the right edge of the window)</p> <p>Regarding the error in the log file:</p> <p>You can increase AndroidStudio memory settings from this file:</p> <pre><code>&lt;ANDROID_STUDIO_INSTALL_DIR&gt;/bin/studio.exe.vmoptions </code></pre> <p>or </p> <pre><code>&lt;ANDROID_STUDIO_INSTALL_DIR&gt;/bin/studio64.exe.vmoptions </code></pre> <p>if you run 64 bits version.</p> <p>I suggest you to try to change the settings to avoid the "java.lang.OutOfMemoryError: GC overhead limit exceeded"</p> <p>This error means that GC is running very long (98% of the time) and less than 2% of the heap is released. So you can try to increase the heap (and restart AndroidStudio):</p> <pre><code>-Xmx1024m </code></pre> <p>Another option, is to disable this check by adding this line in the *.vmoptions file:</p> <pre><code>-XX:-UseGCOverheadLimit </code></pre> <p>(note that since it is not a standard JVM args: it may not be supported by your JVM) Anyway I don't recommend this option, since the GC will run for a while with very poor results and your IDE will be very very unresponsive.</p> <p>I also suggest you to read <a href="https://stackoverflow.com/questions/17501741/android-programming-and-frameworks-ides-to-use/17501917#17501917">this</a> regarding usage of AndroidStudio today.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload