MATLAB: Hardware setup failed for Simulink Android Support package for 18a,18b and 19a

androidharwdare setupMATLABsimulink

Hardware setup is failing with the following error with latest Android Studio 3.5
Unable to find Gradle in the Android Studio folder. Your installation of Android Studio might be out of date or incomplete.
Update Android Studio as described in Get Latest Version of Android Studio.
Attached screenshot

Best Answer

Android Studio 3.5 new update was released by Google on August 20 2019, this release has some major changes because of that you are seeing this error.
As a work around please uninstall Android Studio 3.5 and install old Android Studio(3.4.2) from the following location,
After installation of Android Studio, please run the hardware setup again. Let us know if you face any issue.
Note: Please don't update Android Studio but you can update SDK Tools