particle-iot / spark-setup-android

Former home of the Particle Device Setup library for Android
Apache License 2.0
23 stars 30 forks source link

adding device setup to example app causes example app project not to build. #57

Closed Lcstyle closed 6 years ago

Lcstyle commented 6 years ago

reproduction steps: I am using android studio 3.0.1 I cloned a fresh copy of example app repository.
It builds fine in android studio. si-12-44-08-pm_0004

add compile 'io.particle:devicesetup:0.4.9' to example_app build.gradle

project will no longer compile si-12-44-18-pm_0005

Lcstyle commented 6 years ago

Also, I am adding device setup to my actual android app project, and it also produces odd results. I can build the app, but when I hit run to deploy to genymotion virtual android device, i get the following error:

si-12-55-41-pm_0007

Lcstyle commented 6 years ago

welp.

here's the solution folks:

solution navigate to File/Project Structure... make sure your modules has the same Source and Target Compatibility (1.8 in this case) 2017-12-28_13-06-45

https://stackoverflow.com/a/46112663

Lcstyle commented 6 years ago

I resolved the secondary issue, the main issue is still a problem: si-12-44-18-pm_0005

Lcstyle commented 6 years ago

OK Issue resolved as well.

I removed

compile project(':cloudsdk')

and added

compile 'io.particle:cloudsdk:0.4.8'

to my example app build.gradle file instead.

That resolved the first issue.

Any ideas on why this might be happening?

CityVibes commented 6 years ago

@Lcstyle First issue happens most likely because compile 'io.particle:devicesetup:0.4.9' already provides compile 'io.particle:cloudsdk:0.4.8' thus compiler being unable to solve duplicates from local compile project(':cloudsdk') and published library compile 'io.particle:cloudsdk:0.4.8' .

Another issue - with official android studio 3.0 support for Java 8 target 1.8 is now a requirement for this project (retrolambda was removed in favor of full Java 8 support).