Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java Introduction to Functional Programming Java's Functional Toolset Using forEach

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