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 trial

Java

Dean Maksudu
Dean Maksudu
182 Points

I'm getting Error:Connection refused: connect error after importing the gradle project.

Help me resolve this problem.

Anders Björkland
Anders Björkland
7,481 Points

How's the build.gradle file look like?

Dean Maksudu
Dean Maksudu
182 Points

Anders Björkland , I imported the gradle project. I did no editing.

group 'com.teamtreehouse.challenges' version '1.0.3'

apply plugin: 'java'

sourceCompatibility = 1.8

repositories { mavenCentral() }

test { testLogging { exceptionFormat = 'full' } }

task prepareSubmission(type: Zip) { dependsOn check group = 'Treehouse' description = 'Runs tests and if successful, zips up project for submission' classifier = new Date().format('yyyyMMddHHmmss') from '.' include '' exclude '.gradle/' exclude '.idea' exclude 'build' exclude 'submissions' destinationDir = file('submissions') logger.info('Zip is located in submissions folder') }

dependencies { testCompile fileTree(dir: 'libs', include: ['*.jar']) testCompile group: 'junit', name: 'junit', version: '4.11' }

1 Answer