xoom-examples icon indicating copy to clipboard operation
xoom-examples copied to clipboard

Unable to build `vlingo-iot-android`

Open gaurav- opened this issue 4 years ago • 3 comments

I get the following error when I run the project as per the instructions in README

./gradlew backend:shadowJar

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/gaurav/repos/vlingo/vlingo-examples/vlingo-iot-android/app/build.gradle' line: 1

* What went wrong:
Could not compile build file '/Users/gaurav/repos/vlingo/vlingo-examples/vlingo-iot-android/app/build.gradle'.
//import io.vlingo.build.Proxies
> startup failed:
  build file '/Users/gaurav/repos/vlingo/vlingo-examples/vlingo-iot-android/app/build.gradle': 1: unable to resolve class io.vlingo.build.Proxies
   @ line 1, column 1.
     import io.vlingo.build.Proxies
     ^

  1 error

Not sure what the purpose of that import is or how to get that dependency. Removing it and running leads to the following error:

./gradlew backend:shadowJar

> Configure project :app
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation'.
It will be removed at the end of 2018

> Task :backend:compileKotlin FAILED
e: /Users/gaurav/repos/vlingo/vlingo-examples/vlingo-iot-android/backend/src/main/kotlin/io/vlingo/hike/domain/Journal.kt: (39, 71): Unresolved reference: registerEntryAdapter
e: /Users/gaurav/repos/vlingo/vlingo-examples/vlingo-iot-android/backend/src/main/kotlin/io/vlingo/hike/infrastructure/controller/AlarmController.kt: (15, 22): Type mismatch: inferred type is KFunction1<@ParameterName Throwable, Completes<Response>> but ErrorHandler! was expected
e: /Users/gaurav/repos/vlingo/vlingo-examples/vlingo-iot-android/backend/src/main/kotlin/io/vlingo/hike/infrastructure/controller/HealthcheckController.kt: (15, 22): Type mismatch: inferred type is KFunction1<@ParameterName Throwable, Completes<Response>> but ErrorHandler! was expected
e: /Users/gaurav/repos/vlingo/vlingo-examples/vlingo-iot-android/backend/src/main/kotlin/io/vlingo/hike/infrastructure/controller/HealthcheckController.kt: (18, 22): Type mismatch: inferred type is KFunction1<@ParameterName Throwable, Completes<Response>> but ErrorHandler! was expected
e: /Users/gaurav/repos/vlingo/vlingo-examples/vlingo-iot-android/backend/src/main/kotlin/io/vlingo/hike/infrastructure/controller/TrackController.kt: (20, 22): Type mismatch: inferred type is KFunction1<@ParameterName Throwable, Completes<Response>> but ErrorHandler! was expected
e: /Users/gaurav/repos/vlingo/vlingo-examples/vlingo-iot-android/backend/src/main/kotlin/io/vlingo/hike/infrastructure/controller/TrackController.kt: (24, 22): Type mismatch: inferred type is KFunction1<@ParameterName Throwable, Completes<Response>> but ErrorHandler! was expected
e: /Users/gaurav/repos/vlingo/vlingo-examples/vlingo-iot-android/backend/src/main/kotlin/io/vlingo/hike/infrastructure/controller/TrackController.kt: (28, 22): Type mismatch: inferred type is KFunction1<@ParameterName Throwable, Completes<Response>> but ErrorHandler! was expected
e: /Users/gaurav/repos/vlingo/vlingo-examples/vlingo-iot-android/backend/src/main/kotlin/io/vlingo/hike/infrastructure/controller/TrackController.kt: (32, 22): Type mismatch: inferred type is KFunction1<@ParameterName Throwable, Completes<Response>> but ErrorHandler! was expected

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':backend:compileKotlin'.
> Compilation error. See log for more details

gaurav- avatar Jun 24 '20 15:06 gaurav-

Hi @gaurav- Note that the frontend must be built with the Android SDK.

Hi @kmruiz Would you be able to help @gaurav- get the Android IoT example building again?

VaughnVernon avatar Jun 24 '20 15:06 VaughnVernon

Hi @VaughnVernon, yes I installed the required SDK version after an initial fumble. The above observations are after taking care of the SDK part.

But maybe I haven't done it correctly (I've never done android builds before). This is how I checked the SDK:

$ANDROID_HOME/tools/bin/sdkmanager --version
26.1.1

cc @kmruiz

gaurav- avatar Jun 24 '20 15:06 gaurav-

@gaurav- From what I see your builds are breaking on the backend: .../backend/...

That should not be a problem, but I suspect that the VLINGO API has changed a bit since 14 months ago when it was implemented for a conference demo. We don't run this build with the overall builds because of the required Android SDK, so it can fall behind toolkit progress without notice.

I was actually hoping, however, that you could use this project mainly to see how to use VLINGO with Kotlin. There are many other examples of how to use VLINGO that build and run perfectly. Also make sure you look at VLINGO/SCHEMATA, which is our product for schema registry: https://github.com/vlingo/vlingo-schemata

VaughnVernon avatar Jun 24 '20 16:06 VaughnVernon