URL and Link repository

Monday, September 5, 2016

Android Studio Not Starting - Fixed

See previous post of a few days back.

Finally got Android Studio to start consistently, and I debugged the app Widespread Augmented Reality to a Galaxy Tab 2 7 inch tablet.

These are the steps after a fresh installation of Android Studio and Java on an Acer Windows 10 tablet 8 inch 1 GB RAM 32 bit.

  • File | Settings | Build Tools | Gradle > Check Use default gradle wrapper
  • ....Build Tools | Compiler | Check Use in-process build; Check Configure on demand.
  • File | Other Settings | Default Settings | Build Tools | Compiler > Build process heap size (MBytes) : 2048
  • ....Compiler | Android Compilers > Maximum heap size (MB) : 700MB (Note that this could be increased to 2048)
  • Create a gradle.properties in the parent directory and type 2 lines:
    • org.gradle.jvmargs=-Xmx1024M
      org.gradle.daemon=true
  • Search on Windows for Environment variables and specify the path for JAVA_HOME
  • Navigate to your Android Studio program folder, e.g. c:/Program Files/Android/Android Studio/bin.
  • Edit or verify .../bin/studio.exe.vmoptions. In my case, I set -Xms512, -Xmx1024 -XX:MaxPermSize=300M
  • Back to Android Studio project and edit the Android.manifest file.
  • <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="24" />
    <application android:label="W.A.R. II" android:icon="@drawable/war4" android:name="android.support.multidex.MultiDexApplication">
  • Finally edit build.gradle (Module app).
    • android {
      ...
      dexOptions {
      incremental = true;
      javaMaxHeapSize "1g"
      }

    No comments:

    Post a Comment