androidthings / contrib-drivers

Open source peripheral drivers
Apache License 2.0
560 stars 174 forks source link

Gradle not resolving after compiling rainbow hat #85

Open soorajshankar opened 6 years ago

soorajshankar commented 6 years ago

Error:Execution failed for task ':app:preDebugAndroidTestBuild'.

Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (24.2.0) and test app (25.4.0) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.

Fleker commented 6 years ago

Can you post the line in your gradle file you're using to import the rainbow hat?

On Sun, Dec 17, 2017, 3:10 AM soorajshankar notifications@github.com wrote:

Error:Execution failed for task ':app:preDebugAndroidTestBuild'.

Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (24.2.0) and test app (25.4.0) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/androidthings/contrib-drivers/issues/85, or mute the thread https://github.com/notifications/unsubscribe-auth/ADI58_LG4rCxBB0LEdrNqRRXtmUA-iehks5tBPa2gaJpZM4REns5 .

soorajshankar commented 6 years ago

I fixed that by removing expresso from dependency . But seems some version mismatching is there. BTW this was the way I imported rainbowhat

compile 'com.google.android.things.contrib:driver-rainbowhat:+'

also tried with older version 0.7 and all

Min SDK version 26 target SDK version 26 (tried with 24 as min also then things was not compatible)

Fleker commented 6 years ago

Looks like Rainbow Hat uses 24.2.0 of Android Support Annotations, but only for testing. I don't know why it would conflict with your version.

soorajshankar commented 6 years ago

I think Android Support Annotations are defined as Implementation but not Test Implementation

I doubt that could be a problem if I use another support library with different version

Fleker commented 6 years ago

Yes you're right it isn't defined as testImplementation, but I do wonder why this library is using it. It probably should be updated or perhaps removed.

But implementation shouldn't pass the dependencies through AFAIK.