Controlling on-board LEDs using Android Things on SDM845

100 Views Asked by At

I'm new to Android development, so I'm not familiar with the error message I'm getting. I need to control three on-board LEDs while using a recording app. I've researched two possible solutions.

The first was to look for other open source apps that control phone LEDs, but I couldn't find any open source apps to look at.

The next thing, and what i think is the more correct way, is using Android Things. As I understand it, I should be able to use the Things API in a full android app to control LEDs. I've followed the tutorial shown here: https://developer.android.com/things/training/first-device/create-studio-project

I'm sure I've followed the basic steps correctly which involves modifying the user libraries, editing the gradle file, and adding a GPIO permission. I've also confirmed this with multiple different Android Things Tutorials.

The problem I"m running into is that I'm getting this error:

Installation did not succeed. The application could not be installed: INSTALL_FAILED_MISSING_SHARED_LIBRARY List of apks: [0] 'C:\Users\Richard\AndroidStudioProjects\LEDControl\app\build\outputs\apk\debug\app-debug.apk' Installation failed due to: 'null'

I've tried seraching for solutions and the main one I Found was to add -r and -t as compile flags, but that didn't fix the issue.

I've looked at the logcat when trying to load the app on to my device, but I don't understand why I'm getting the not-found error:

2020-07-29 14:43:11.719 1833-1883/system_process W/PackageManager: Reconciliation failed... com.android.server.pm.PackageManagerService$ReconcileFailure: Reconcile failed: Package com.example.ledcontrol requires unavailable shared library com.google.android.things; failing! at com.android.server.pm.PackageManagerService.reconcilePackagesLocked(PackageManagerService.java:16752) at com.android.server.pm.PackageManagerService.installPackagesLI(PackageManagerService.java:17113) at com.android.server.pm.PackageManagerService.installPackagesTracedLI(PackageManagerService.java:16402) at com.android.server.pm.PackageManagerService.lambda$processInstallRequestsAsync$13$PackageManagerService(PackageManagerService.java:14647) at com.android.server.pm.-$$Lambda$PackageManagerService$S4WxZjKnT0iu1kmEXSrs7BiizN4.run(Unknown Source:6) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.os.HandlerThread.run(HandlerThread.java:67) at com.android.server.ServiceThread.run(ServiceThread.java:44)

I've also tried downloading the sample programs listed on the site, but they give me gradle build errors.

At this point, I'm not really sure what else to do and any help (including alterantive solutions for controlling on board LEDs) is much appreciated.

Thank you,

0

There are 0 best solutions below