build.gradle - Android Gradle Issue -


i know there 100's of questions/answers around topic, none of them seem give me answer. know some(if not all) of problems around lack of understanding of gradle in general. but, i'm hoping help.

i've got project working fine on desktop. i'm traveling week, , wanted work on over laptop. have files, , have same version of android studio on both machines. kept getting kinds of gradle errors when opening project. think i've went on several wild goose chases @ point.

so decided step , create new blank project in studio. has kinds of gradle issues. tried uninstalling android studio , re-insatlling, , still no dice getting basic project not give gradle errors.

i getting

11:12:27 pm gradle 'myapplication' project refresh failed: fatal exception has occurred. program exit. : gradle settings

as error.

below 2 gradle files.

top level file(which blank in actual project, has in in default one)

// top-level build file can add configuration options common sub-projects/modules.  buildscript {     repositories {         mavencentral()     }     dependencies {         classpath 'com.android.tools.build:gradle:0.7.+'     } }  allprojects {     repositories {         mavencentral()     } } 

the next build file

apply plugin: 'android'  android {     compilesdkversion 19     buildtoolsversion "19.0.1"      defaultconfig {         minsdkversion 7         targetsdkversion 19         versioncode 1         versionname "1.0"     }     buildtypes {         release {             runproguard false             proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.txt'         }     } }  dependencies {     compile 'com.android.support:appcompat-v7:+'     compile 'com.android.support:support-v4:18.0.0' } 

i using android studio 0.4.2

i @ complete loss of going on. think studio not recognizing android project. tried of gradlew.bat commands , got error mentioning not "apply plugin: 'android'" entry. but, have no idea why be.

any thoughts on should start appreciated. have no ideas of go next, , guessing @ anymore not option.

i've got same issue intellij idea(which android studio based on) on laptop , found solution here: https://code.google.com/p/android/issues/detail?id=65219

set file -> settings -> compiler -> java compiler -> additional command line parameters

-xms256m -xmx512m

file -> settings -> compiler -> gradle -> vm options

-xx:maxheapsize=256m -xmx256m

and in yourappname/build.gradle update dependencies use newer gradle version

classpath 'com.android.tools.build:gradle:0.9.+'

then restart android studio , should fine. otherwise can take @ full log file going -> show log in explorer


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -