Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialprateekparekh
12,895 PointsGradle build running for more than 4 minutes every time I rerun an app after making changes. AVD is already running.
Is this normal? The time it takes to run the app in the video is almost instantaneous.
Specifically, the status bar shows up as below Executing tasks: [:app:assembleDebug] (5 minutes ago) . Gradle build running .....
build.grade is shown below:
// 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:2.3.3'
// 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 }
1 Answer
Ben Deitch
Treehouse TeacherWe might be speeding things up a bit through the magic of editing ;)
That said, 4 minutes is a REALLY long time for an app to build. Unless you're on an older laptop, it shouldn't be taking that long. Here's a guide on how to Optimize Your Build Speed that might be useful. I haven't tried it, but hopefully it's able to help out.
prateekparekh
12,895 Pointsprateekparekh
12,895 PointsThanks! It seems to have gotten better by itself. However, I see the following message on the console when running my app.
Also, I added the following log message that is also not showing up in logcat
Log.d("FunFactsActivity", "We're logging from the onCreate() method!");