Simulink android camera deploy to hardware problem (error)

Hi, please help me in this problem,
I want to use my android phone's camera as an output for my App (using App Designer MATLAB).
I found that I can use Simulink Android toolbox to realize this goal.
The problem is everytime I clicked deploy to hardware, it always shows this error
### Starting build procedure for model: test
Code Generation
1
Elapsed: 15 sec
Execution failed for task ':libraries:opencv:compileDebugAidl'. > java.io.IOException: com.android.ide.common.process.ProcessException: Error while executing process C:\Users\Howgen\AppData\Local\Android\sdk\build-tools\29.0.0-rc2\aidl.exe with arguments {-pC:\Users\Howgen\AppData\Local\Android\sdk\platforms\android-28\framework.aidl -oC:\Users\Howgen\androidtrial\test_ert_rtw\test\libraries\opencv\build\generated\source\aidl\debug -IC:\Users\Howgen\androidtrial\test_ert_rtw\test\libraries\opencv\src -IC:\Users\Howgen\androidtrial\test_ert_rtw\test\libraries\opencv\src\debug\aidl -dC:\Users\Howgen\AppData\Local\Temp\aidl7375139775474552336.d C:\Users\Howgen\androidtrial\test_ert_rtw\test\libraries\opencv\src\org\opencv\engine\OpenCVEngineInterface.aidl} *
### Build procedure for model: 'test' aborted due to an error.
Error(s) encountered while building "test": ### Failed to generate all binary outputs.
Component:Simulink | Category:Block diagram error
My block diagram is I connected Android Camera with Android Video Display as dummy trial.
I have followed all steps during the installation of the support package and installed all the latest version of Android Studio.
For your information I am using MATLAB R2019a and Simulink version 9.3
Please help, thank you !

 Accepted Answer

Please note, the Camera block works fine with Android SDK Build Tools 28.0.3. However, if build tool version 29.0.0-rc2 is present then the above issue comes up.
To resolve the issue, you can uninstall build tool 29.0.0-rc2 and install version 28.0.3

3 Comments

Hi Sruthi,
I have uninstalled the build tool 29.0.0-rc2 and installed version 28.0.3 using Android Studio.
But the error still persist, it seems that whenever I deploy to hardware, the Android Studio automatically update the SDK Build tools.
Do you have a solution for this ?
Here is the error log:
Execution failed for task ':libraries:opencv:compileDebugAidl'. > java.io.IOException: com.android.ide.common.process.ProcessException: Error while executing process C:\Users\Howgen\AppData\Local\Android\sdk\build-tools\29.0.0-rc2\aidl.exe with arguments {-pC:\Users\Howgen\AppData\Local\Android\sdk\platforms\android-28\framework.aidl -oC:\Users\Howgen\androidtrial\testtest_ert_rtw\testtest\libraries\opencv\build\generated\source\aidl\debug -IC:\Users\Howgen\androidtrial\testtest_ert_rtw\testtest\libraries\opencv\src -IC:\Users\Howgen\androidtrial\testtest_ert_rtw\testtest\libraries\opencv\src\debug\aidl -dC:\Users\Howgen\AppData\Local\Temp\aidl4124300221427550426.d C:\Users\Howgen\androidtrial\testtest_ert_rtw\testtest\libraries\opencv\src\org\opencv\engine\OpenCVEngineInterface.aidl} *
After uninstalling, please run Android Hardware setup again. Then try deploying the model
Thanks a lot Sruthi ! It solved my problem !

Sign in to comment.

More Answers (1)

How prevent automatic actualization of build tool? I ran Hardware setup and at momento to build the system actualize tool versión

3 Comments

Hi Carlos,
Build tools, will not be updated automatically. If you have build tools 29.0.0-rc1 or 29.0.0-rc2. Please uninstall those versions of build tools and insatll 28.0.3 . After completing the above step, run Hardware setup again. Let me know if you face any issues
Hi Sruthi,
I have Matlab 2018b with Simulink 9.2 and I am facing the problem.
I have deinstalled the SDK build tool 29.0.0-rc3 and installed 28.0.3 several times, and each time I ran Hardware setup again.
But each time I let simulink compile for android it reinstalls 29.0.0-rc3. The problem also excists with every block I try in simulink, so not only the camera and screen block.
Is there any way to force simulink to compile with 28.0.3?
I have android studio 3.4.
Hi Carlos,
im wondering do you have a solution for this yet? because im facing the same issue, and cant figure it out

Sign in to comment.

Products

Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!