Why does Build fail during Hardware Setup for Simulink Android Support Package for R2018a and R2018b
Show older comments
Build fails during the Hardware Setup with the following failure
Build App A problem occurred configuring root project 'TestApp'. > No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android *
5 Comments
Jorge Celedón
on 5 Oct 2018
Thank you, It worked to build the app. Now I am getting this message: "Could not detect TestApp on the device screen. The screen may be locked or turned off. Ensure that your device screen is unlocked throughout the verification process". The phone is unocked and TestApp running on the phone. Hope you can help me, thanks.
Sruthi Yenugula
on 8 Oct 2018
Longhai Li
on 9 Oct 2018
yes, I have met the same problem. When typed cordertarget.androi.AppBuilder(1) in MATLAB command, ans is following: >> codertarget.android.AppBuilder(1)
ans =
AppBuilder - 属性:
GradlePath: 'X:\Program Files\Android\Android Studio\gradle\gradle-4.6'
JavaPath: 'X:\Program Files\Android\Android Studio\jre'
NDKPath: 'X:\Users\Longhore\AppData\Local\Android\sdk\ndk-bundle'
OpenCVPath: 'X:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\androidopencv.instrset\opencv-android-sdk'
SDKPath: 'X:\Users\Longhore\AppData\Local\Android\sdk'
AppName: []
ApkFilePath: []
PackageName: []
ProjectPath: []
ActivityName: []
DefDevice: []
Devices: []
NDKBuildType: 'release'
SkipDeviceCheck: 1
AndroidPluginVersion: '2.3.0'
AppCompactVersion: '26.0.0-alpha1'
DesignVersion: '26.0.0-alpha1'
CompileSdkVersion: '28'
BuildToolsversion: '28.0.3'
defOpts: [1×1 struct]
my mobile phone is Huawei mate 9 pro.
Sruthi Yenugula
on 11 Oct 2018
Edited: Sruthi Yenugula
on 11 Oct 2018
madhan ravi
on 10 Dec 2018
Please don't close question that have an answer.
Accepted Answer
More Answers (6)
Sruthi Yenugula
on 22 Oct 2018
Edited: Sruthi Yenugula
on 10 Dec 2018
3 votes
2 Comments
Ryan Mendiola
on 22 Oct 2018
Edited: Ryan Mendiola
on 22 Oct 2018
Hi Sruthi Yenugula,
The patch worked for me. Thank you!
Milind Shastri
on 25 Oct 2018
Worked for me
Emilio Maranci
on 28 Oct 2018
0 votes
Hi Sruthi Yenugula, I had the same problem described before, in particular the error "No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android *". I've fixed it using Androidfix_18b.zip, but now I've a new issue. During hwsetup I've encountered problem with the connection test. The error is: "Could not find device configuration file created by TestApp.". How can I solve it?
2 Comments
Sruthi Yenugula
on 29 Oct 2018
Emilio Maranci
on 29 Oct 2018
Thank you, Sruthi. Probably there was some issues with my smartphone, but I fix it. I've changed device and now it works.
Alessio Conte
on 19 Nov 2018
Edited: Alessio Conte
on 19 Nov 2018
- When I try to build an app on my device i get the error:
Cannot write to file androidObjectDetection\\src\\main\\res\\layout\\fragment_app.xml.
- This is my situation:
>> codertarget.android.AppBuilder(1)
ans =
AppBuilder with properties:
GradlePath: 'C:\Android\gradle\gradle-4.6'
JavaPath: 'C:\Android\jre'
NDKPath: 'C:\Users\User\AppData\Local\Android\sdk\ndk-bundle'
OpenCVPath: 'C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\androidopencv.instrset\opencv-android-sdk'
SDKPath: 'C:\Users\User\AppData\Local\Android\sdk'
AppName: []
ApkFilePath: []
PackageName: []
ProjectPath: []
ActivityName: []
DefDevice: []
Devices: []
NDKBuildType: 'release'
SkipDeviceCheck: 1
AndroidPluginVersion: '3.1.0'
AppCompactVersion: '26.0.0-alpha1'
DesignVersion: '26.0.0-alpha1'
CompileSdkVersion: '28'
BuildToolsversion: '28.0.3'
defOpts: [1×1 struct]
- I tried solution Androidfix_18b.zip you metioned above but i still have same problem
What can I do?
1 Comment
Sruthi Yenugula
on 20 Nov 2018
yubao cao
on 23 Nov 2018
0 votes
Dear Sruthi Yenugula.
I have R2018a version of MATLAB. When I run the app,it shows "com.mathworks.test not install."
I have installed the package for a week.
4 Comments
Sruthi Yenugula
on 23 Nov 2018
yubao cao
on 24 Nov 2018
Hi,Sruthi Yenugula,
I tried many times,then it works!But when I run the communication with android device, it shows,
Unexpected error : [armeabi-v7a] Compile thumb : androidCommunicationExample <= ert_main.c In file included from ../ert_main.c:4: In file included from C:/Users/CYB/AppData/Local/Temp/ANDROI~2/androidCommunicationExample.h:10: C:/Users/CYB/AppData/Local/Temp/ANDROI~2/rtwtypes.h:4:10: fatal error: 'tmwtypes.h' file not found #include "tmwtypes.h" ^~~~~~~~~~~~ 1 error generated. make: *** [C:\Users\CYB\AppData\Local\Temp\androidCommunicationExample_ert_rtw\androidCommunicationExample\src\main/obj/local/armeabi-v7a/objs/androidCommunicationExample/ert_main.o] Error 1
Sruthi Yenugula
on 26 Nov 2018
Yongbo Wei
on 26 Nov 2019
I have encountered the same problem as you. Have you solved this problem? How can I solve it? I have been bothered for 15 days. If there is a new solution, please tell me, thank you very much. A good man has a safe life.
omar sheishaa
on 9 Dec 2018
0 votes
kingly note that i run pluginfix.m file and its output is "Could not copy .p files : No matching files were found." then i tried to verify the configuration of Android Device and got the same error at the step of testing connection like before "Could not detect TestApp on the device screen. The screen may be locked or turned off. Ensure that your device screen is unlocked throughout the verification process."
5 Comments
Sruthi Yenugula
on 10 Dec 2018
omar sheishaa
on 10 Dec 2018
Hi Sruthi
i proceeded with deployment of the model but i got an error "Simulink cannot determine sizes and/or types of the outputs for block 'slexHARAndroidExample/predictActivity' due to errors in the block body, or limitations of the underlying analysis. The errors might be inaccurate. Fix the indicated errors, or explicitly specify sizes and/or types for all block outputs." although it worked before , also this model is verified by matlab in this links https://www.mathworks.com/help/supportpkg/android/ug/run-model-on-android-hardware.html
Sruthi Yenugula
on 11 Dec 2018
omar sheishaa
on 5 Jan 2019
Hi Sruthi
yes 'EnsembleModel.mat' was created and i have the above mentioned toolboxs but the issue is the same, meanwhile i'm trying to run slexHARAndroidExample on Simulink itself without deploying it on android device to test it and enter the readings manually but i got the below errors
Index exceeds array dimensions. Index value 0 exceeds valid range [1-2049] of array f.
Error in 'slexHARAndroidExample/extractFeatures' (line 133)
ofpk = f(olocs);
Error in 'slexHARAndroidExample/extractFeatures' (line 62)
Error in 'slexHARAndroidExample/extractFeatures' (line 16)
kindly assist
Sruthi Yenugula
on 8 Jan 2019
Aditya Rastogi
on 21 Apr 2019
0 votes
Hi Shruti,
I am getting the error of " Test connection Could not detect TestApp on the device screen. The screen may be locked or turned off. Ensure that your device screen is unlocked throughout the verification process. " I am using MATLAB 2018b. How can I sort it out?
10 Comments
Sruthi Yenugula
on 22 Apr 2019
Aditya Rastogi
on 22 Apr 2019
Hi Shruti,
The test app opens on my mobile phone and I ensured that the screen is not locked. The version of my phone is moto G6 and the android version that I am using is 8.0.0
Aditya Rastogi
on 22 Apr 2019
I am also getting this error when I am trying to play any example
Caught "std::exception" Exception message is:
Bundle#74 start failed: Loading C:\Program Files\MATLAB\R2018b\bin\win64\simulink_plugins\slcg_bhm_plugin\libmwslcg_bhm_plugin.dllf
Sruthi Yenugula
on 23 Apr 2019
Ribhu Vajpeyi
on 12 Sep 2019
Hi Sruthi,
I have MATLAB version R2018a. I used the file provided by you on 26th September, 2018 in one of the above answers - Androidfix_18a.zip. I am gettign the same error as Adiya after the Build and Run App steps. I ran the above two commands as you had suggested :
- sdkPath = 'C:\Users\username\AppData\Local\Android\Sdk'
- [s,r] = codertarget.android.internal.runAdb(sdkPath,[' shell dumpsys window | grep mCurrentFocus'])
Here is the output :
- sdkPath = 'C:\Users\username\AppData\Local\Android\Sdk'
- s = 255, r = ''grep' is not recognized as an internal or external command, operable program or batch file.'
I have a OnePlus 5 mobile-phone which I'm trying to use with the package. Kindly advice as to what to do.
Thanks in advance!
Sruthi Yenugula
on 12 Sep 2019
Sruthi Yenugula
on 12 Sep 2019
Ribhu Vajpeyi
on 12 Sep 2019
Hi Sruthi,
I have been using MATLAB since last year's July. But I downloaded this particular package yesterday itself. I only used the file you had provided last year since I was getting an error on the build step itself and on Googling, I found the patch file you had provided last year in the one of the answers above. On using it, the build step worked and I could see the test app on my phone's screen. However in the final step an error is coming :
Could not detect TestApp on the device screen. The screen may be locked or turned off. Ensure that your device screen is unlocked throughout the verification process.
- as Aditya had pointed out.
Kindly let me know how to fix it.
Thanks again!
Sruthi Yenugula
on 12 Sep 2019
Ribhu Vajpeyi
on 26 Sep 2019
Hi Sruthi,
I tried it without the hardware setup as you suggested for couple of Apps. It's working great! Thanks a lot!
Categories
Find more on Android Devices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!