MATLAB: App building on Android device fails due to an error: Cannot read file androidObj​ectDetecti​on\\src\\m​ain\\res\\​layout\\An​droidManif​est.xml.

androidappbuildingsimulinkTarget Support Package

Hi heveryone. I have MATLAB R2018b.
  • I have the simulink support package for android devices correctly installed
  • I followed the guided procedure to install Android Studio and all the tools.
  • When i try to build the Simulink model to my device I get the error:
Cannot read file filename C:\Users\User\Desktop\Examples\MotoObjectDetection_ert_rtw\MotoObjectDetection\src\main\AndroidManifest.xml
  • Two new folders are created inside my working folder:
  • MotoObjectDetection_ert_rtw
  • slprj
When I try to re-build again evrething works fine and the app is deployed to the hardware.
How can I work around this problem?

Best Answer

regarding the below error, looks like permission issues. Please build the models in different directory and see if you get the same issue. please let us know if you face any issues
Cannot read file filename C:\Users\User\Desktop\Examples\MotoObjectDetection_ert_rtw\MotoObjectDetection\src\main\AndroidManifest.xml
Related Question