Why does Build fail during Hardware Setup for Simulink Android Support Package for R2018a and R2018b

조회 수: 14 (최근 30일)
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
Sruthi Yenugula
Sruthi Yenugula 2018년 10월 11일
편집: Sruthi Yenugula 2018년 10월 11일
Hi Longhai Li,
From the information you shared, looks like you have not updated the Android Support package with patch.

댓글을 달려면 로그인하십시오.

채택된 답변

Sruthi Yenugula
Sruthi Yenugula 2018년 9월 26일
Use the following workaround, only if you get the error mention Question section.
To resolve the issue for R2018a,
This issue is with new NDK version. Use this work around for now to get started with Android Support Package. Attached the Androidfix_18a.zip file. It contains 5 files. In MATLAB, go to path where you have placed that unzipped folder and then open the androidfix.m file and click on Run button. Now try Hardware Setup again. If copy files, start MATLAB as administrator.
To resolve the issue for R2018b,
This issue is with new NDK version. Use this work around for now to get started with Android Support Package. Attached the Androidfix_18b.zip file. It contains 5 files. In MATLAB, go to path where you have placed that unzipped folder and then open the androidfix.m file and click on Run button. Now try Hardware Setup again. If copy files, start MATLAB as administrator.
  댓글 수: 11
Ryan Mendiola
Ryan Mendiola 2018년 10월 22일
편집: Ryan Mendiola 2018년 10월 22일
Hi Sruthi Yenugula,
Thanks for this info. I was trying also to setup for device Galaxy S5.I follow the above solution but still encountering the Test connection error. When typing in MATLAB the command:
[s,r] = codertarget.android.internal.runAdb(sdkPath,[' shell dumpsys window | grep mCurrentFocus'])
MATLAB command window displays:
s =
255
r =
''grep' is not recognized as an internal or external command,
operable program or batch file.
'
Sruthi Yenugula
Sruthi Yenugula 2018년 10월 22일
Thanks a lot Ryan, for providing the information. Will investigate and get back.

댓글을 달려면 로그인하십시오.

추가 답변 (6개)

Sruthi Yenugula
Sruthi Yenugula 2018년 10월 22일
편집: Sruthi Yenugula 2018년 12월 10일
@Ryan, @Danyang, @Longhai, @Jorge : Thanks for your patience.
This patch is only for 18b release, don't use for any other release
Use this patch if you get the following error:
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.
Attached the Androidpatchfor18b_name.zip file. It contains 4 files. In MATLAB, go to path where you have placed that unzipped folder and then open the pluginfix.m file and click on Run button. Now try Hardware Setup again. If copy files, start MATLAB as administrator. Thanks for your patience. Let us know if you face any issues.

Emilio Maranci
Emilio Maranci 2018년 10월 28일
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
Sruthi Yenugula
Sruthi Yenugula 2018년 10월 29일
Hi Emilio, Please check the above answer(2nd answer). https://www.mathworks.com/matlabcentral/answers/420799-why-does-build-fail-during-hardware-setup-for-simulink-android-support-package-for-r2018a-and-r2018b#answer_342686
Emilio Maranci
Emilio Maranci 2018년 10월 29일
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
Alessio Conte 2018년 11월 19일
편집: Alessio Conte 2018년 11월 19일
Dear Sruthi Yenugula. I have R2018b version of MATLAB.
  • 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]
What can I do?
  댓글 수: 1
Sruthi Yenugula
Sruthi Yenugula 2018년 11월 20일
If you had installed the latest Android Support package, then no need of applying the patch.
The patch should be applied only if you get the following error during hardware setup
"No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android *"
If we didn't get that error and still applied that patch, i suggest you to uninstall and reinstall the Android Support package.
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 write to file androidObjectDetection\\src\\main\\res\\layout\\fragment_app.xml.

댓글을 달려면 로그인하십시오.


yubao cao
yubao cao 2018년 11월 23일
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
Sruthi Yenugula
Sruthi Yenugula 2018년 11월 26일
There is some issue with your MATLAB installation, please reinstall the MATLAB and also the Support Package.
Yongbo Wei
Yongbo Wei 2019년 11월 26일
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
omar sheishaa 2018년 12월 9일
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
omar sheishaa
omar sheishaa 2019년 1월 5일
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
Sruthi Yenugula 2019년 1월 8일
Did you make any changes to the example or followed the same exact steps? When I try it is working fine from my end. Please conatct customer support, they will help you debug the issue.

댓글을 달려면 로그인하십시오.


Aditya Rastogi
Aditya Rastogi 2019년 4월 21일
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
Sruthi Yenugula
Sruthi Yenugula 2019년 9월 12일
Hi Ribhu,
You can go ahead and create models with Android Support Package, you can ignore that test connection failure.
Ribhu Vajpeyi
Ribhu Vajpeyi 2019년 9월 26일
Hi Sruthi,
I tried it without the hardware setup as you suggested for couple of Apps. It's working great! Thanks a lot!

댓글을 달려면 로그인하십시오.

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by