question

joel avatar image
joel asked joel commented

Clover SDK fails to build (OS X or Windows)

I'm trying to build the clover SDK using the gradlew command and it always breaks with an exception. I have run out of ideas. Could somebody give me a light about what I'm doing wrong ? This is the SDK freshly downloaded, no changes at all.

This what I get:

$ ./gradlew

    Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence.
java.lang.IllegalStateException: buildToolsVersion is not specified.
        at com.google.common.base.Preconditions.checkState(Preconditions.java:176)
.
. the exception stuff
.

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/joel/Downloads/clover-android-sdk-master/clover-android-sdk/build.gradle' line: 21

* What went wrong:
A problem occurred evaluating project ':clover-android-sdk'.
> Failed to apply plugin [id 'android-maven']
   > Could not create plugin of type 'AndroidMavenPlugin'.
4 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

What version of Java are you using? What version of Android Studio? We have many people that compile on OSX. Windows not so much. I personally don't use the wrapper and use Gradle 2.3, but there's no reason why it should not work.

0 Likes 0 ·
joel avatar image joel commented ·

I'm using Android Studio 2.1.3 and Java 1.8.0_101. I too tried compiling it using Gradle and the result is the same. Any ideas ?

0 Likes 0 ·
Bryanne Vega avatar image Bryanne Vega commented ·

Hi Joel, stick with java 7 for now (if your apps are for the clover itself), I've been having issues as the signing is different from each java versions, you might not be able to upload your APKs to the Clover Market

0 Likes 0 ·
joel avatar image joel commented ·

Hi Bryanne, I'm able to sign a generic android app (that does not use the clover SDK) and upload it to the sandbox market and to a clover dev kit. So i don't think java is the issue here.

0 Likes 0 ·
james-cha avatar image
james-cha Deactivated answered joel commented

Hey Joel,

Can I ask why you're trying to build our sdk instead of adding the dependency to your Android project?

I believe it is failing to grab or compile the AndroidMavenPlugin. Which my sense is where the buildToolsVersion part is failing.

10 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

joel avatar image joel commented ·

Hi James, I'm trying to build the SDK to bind the libs to a Xamarin project. But I get this error even trying to build your sample projects.

0 Likes 0 ·
james-cha avatar image james-cha commented ·

Hey Joel,

Have you tried running ./gradlew clean then doing ./gradlew again?

0 Likes 0 ·
joel avatar image joel commented ·

Hey James,

Yes, I've done that and even with the clean parameter it gives me that error. I just tried it again and it throws the same exception.

0 Likes 0 ·
james-cha avatar image james-cha commented ·

I just want to make sure my understanding of your environment is the same. So on your computer (OSX or Windows shouldn't matter) you cloned our SDK (https://github.com/clover/clover-andr...) in its own clean directory and you open up terminal/cmd in the /clover-android-sdk not /clover-android-sdk/clover-android-sdk and you run ./gradlew and that is what error you get?

0 Likes 0 ·
joel avatar image joel commented ·

Yes, exactly as you described. I even tried both environments: OS X and Windows. Same result.

0 Likes 0 ·
Show more comments
Bryanne Vega avatar image
Bryanne Vega answered

Are you downloading the Clover SDK manually?

Try, if Android Studio to add it by going to Project > Dependecies > Add Library & search for com.clover.sdk it should pop up.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community