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

ITAY GAZIT
ITAY GAZIT
12,159 Points

Spark Framework - problem adding sql server dependency

Hello, I'm trying to add sql server dependency in "build.grandle" file:

compile 'com.microsoft.sqlserver'

get the following error: "Could not get unknown property 'compile' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler."

any idea?

1 Answer

You want to use a Microsoft SQL Server? Do you have one already installed and running?

Your gradle setting is missing information. Did you mean to add this: https://mvnrepository.com/artifact/com.microsoft.sqlserver/sqljdbc4/4.0 or that: https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc (select the correct Java version for your project)