0

everytime when I start Android Studio 3.0 it is hanging when trying to make the grade build. See here enter image description here

I tried already nearly everything I could find to fix that problem in the i-net but without any success. My AS is running with the newest updates and plugins for AS and Gradle. I also set up gradle to run offline. Instant run is disabled.

Here is my build.gradle (project):

    // Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

And here is my gradle.build (module app):

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "26.0.2"
    defaultConfig {
        applicationId "com.wbapps.wbshoppinglist"
        minSdkVersion 17
        targetSdkVersion 25
        versionCode 1
        versionName "2.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
}

As a workaround I try to close the loading project AS is trying to open when it starts immediatelly and open the project from the welcome screen of AS. This works - but not always!

Meanwhile I am a little bit desperate with the situation. What went wrong with AS and whatt can I do to avoid the situation?

Please let me know what kind of information I could provide additional. I am quit new to AS and so I do not know all the resources which are needed - sorry! Any idea would be great!

Community
  • 1
  • 1
Arthur Meier
  • 159
  • 1
  • 5
  • 14
  • you system RAM? This may help https://stackoverflow.com/questions/16775197/building-and-running-app-via-gradle-and-android-studio-is-slower-than-via-eclips – Vishnu T S Nov 15 '17 at 06:26
  • Txs for your answer. I tried the sugg. on that website. There was a minor effect - specially when I checked usinfg gradle local path.But now I'm running to other problems:The IDE is hanging with "scanning files for indexing". Seems depending wether Antivirus is switched on or off. But it is not an option to disable the AV (Defender/W10) when working with AS. And even with switched off I run into "2 more processes are running" without getting any info what processes. I spent more time with config AS than coding. It is dissapointing. Was not before AS 3.0 – Arthur Meier Nov 16 '17 at 02:41
  • Do you have any emulator running?This will slow down the process – Vishnu T S Nov 16 '17 at 05:33
  • What do you mean? When I start AS there is no emulator running. Whenever my project comes up then of course I use an emulater to test. But then I have already successfully started AS with my workaround I descripted in the post. – Arthur Meier Nov 16 '17 at 09:09
  • It seems to be I found a solution which is working for me: There have been two gradle versions in my folder C:\Users\___\.gradle\wrapper\dists After I deleted the older one it seems that AS is starting now without any hanging. Hope this will help othersa also! – Arthur Meier Nov 27 '17 at 03:34
  • Great. Please add an answer – Vishnu T S Nov 27 '17 at 05:13
  • Why should I add an answer? The info when clicking the answer button says I should only use it whenever there is additional information to find a solution. It does not say to close the question in that way. By the way - this is another problem I can not solve. I looked already in the FAQ, help and in google and co. But I did not find the right way. And I am not alone. Very complicated. In the past there was a green arrow for that. – Arthur Meier Nov 30 '17 at 00:52
  • It seems that it was too early getting happy about the situation. Today it is the same like before: Gradle is hanging when build! Slowly slowly I begin to feel very unhappy with AS. I think I have to see how Eclipse is suiting my needs! What a pitty. Once I loved AS. – Arthur Meier Nov 30 '17 at 00:53

1 Answers1

0

Just to make it complete: It seems to be gradle only needs a very long time to finish the build. If I was waiting more than 10 minutes I could start with my project. I never expected such a situation. My desktop is not really less equipped (Win 10 1709, 8GB Ram, Intel Core i5 6600). But ok - in the end it is important I can use AS. I have to be patient! Thanks to all

Arthur Meier
  • 159
  • 1
  • 5
  • 14