question

c716524 avatar image
c716524 asked Miguel Deactivated edited

Running the Android examples provided on github

I am trying to run the android-examples provided on github ( https://github.com/clover/android-examples), but as a newbie with Android Studio (I have version 3.0.1 running) I am struggling with Gradle, since its version does not fit to the examples. As far as I understand the wrapper should help in overcoming this problem, but I keep getting error messages. I also added classpath 'com.android.tools.build:gradle:2.14.1' in the build.gradle file (a suggestion I found on the Internet) but this created errors in finding the right gradle version.

Can anybody give me a few hints on how to get these examples running?
Clover Android SDK
10 |2000

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

1 Answer

Miguel avatar image
Miguel Deactivated answered Miguel Deactivated edited
You can follow these steps to get the android-examples apps running from Android Studio (Version 3.0.1) on a Clover DevKit device:

  1. In Android Studio, click File > Open. Browse to the folder of the sample app that you want to run (eg, /android-examples-master/barcodereceiver). Click Open.
  2. You might see a Grade Sync pop-up dialog. Click OK to use the Gradle wrapper.
  3. After Android Studio opens, you probably are seeing a "Grade project refresh failed" error
  4. You will need to update the gradle version of your project. You can do this by going to File > Project Structure.
  5. In the pop-up window, select Project.
  6. Update the Android Plugin Version to a newer version (eg, 3.0.1).
  7. Click OK. It may take a few minutes for the gradle build to finish.
  8. You should now be able to run the app by selecting the Run 'app' button in the toolbar and selecting the device to sideload on.
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