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

Clara Stancu
Clara Stancu
5,687 Points

[SOLVED] Don't know how to solve this error

When i am importing this script:

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-csv</artifactId>
    <version>1.8</version>
</dependency>

it is automatically transformed to:

compile 'org.apache.commons:commons-csv:1.8'

I leave it like that because i am using a newer version than in the video, but after i try to compile the program, the following error occurs:

Could not find method compile() for arguments [org.apache.commons:commons-csv:1.8] on root project 'reviews.jar' of type org.gradle.api.Project.

Is it because i named the project 'reviews.jar'? or there is another thing causing this?

1 Answer

Clara Stancu
Clara Stancu
5,687 Points

I solved it. The compile 'org.apache.commons:commons-csv:1.8' line was supposed to be commented, i forgot about it