Run CySmart Source Code on Android Studio 3.1 - KBA 224169
Translation - Japanese: Android Studio 3.1でCySmartソースコードを実行する - KBA 224169 - Community Translated (JA)
The CySmart source code is based on the Android Studio 1.3.1. How can I run the source code on a newer version of Android Studio?
CySmart is a Bluetooth Low Energy (BLE) utility developed by Cypress which can be used with any BLE products using standard Bluetooth Sig-adopted or custom BLE profiles and service. You can get the apk file and source file of CySmart from the Cypress website.
You can develop your own apps based on CySmart using the Android Studio because Cypress has provided the source code for your reference. When you try to run the CySmart source code, you may find some errors because the source code is developed on a previous version of Android Studio. You need to make some changes before you run the CySmart apps source code. Follow these steps to run the apps source code on Android Studio 3.1, which is the latest version as of now:
- Install the Android Studio 3.1 and java environment.
- Select the Android SDK platform and open the CySmart source file with the Android Studio. The Android Studio will automatically try to sync the gradle, but will fail because of the unsupported method.
- Open the build.gradle file, and change the Android Plugin version to 2.3.2.
- You may also need to change the mavenCentral() to jcenter, if the Android Studio is unable to find gradle file.
- Open gradle-wrapper.properties and change the gradle version in distributionUrl to 3.3.
- In the build.gradle file, change the buildToolsVersion to 25.0.0.
- In the Android Studio, click Try Again for the Gradle to sync. Then, click Run.
Now you can run the CySmart on the Android Studio 3.1 successfully