Simulink Support Package For Android Devices --> Hardware Configuration: Building TestApp fails
조회 수: 6 (최근 30일)
이전 댓글 표시
Hello,
I want to install the Simulink support package for Android devices and followed the steps in the configuration menu. I got stuck at step: "Verify configuration of your Android device". Here a shortened version of the error message:
Build App
A problem occurred configuring root project 'TestApp'. > Could not resolve all artifacts for configuration ':classpath'. > Could not resolve com.google.flatbuffers:flatbuffers-java:1.12.0. Required by: project : > com.android.tools.build:gradle:4.2.0 > Could not resolve com.google.flatbuffers:flatbuffers-java:1.12.0.
...
My Matlab installation: MATLAB Version: 9.11.0.1873467 (R2021b) Update 3
When running in the MATLAB command line:
>> codertarget.android.internal.AndroidStudioWorkflowValidator.getInstance
I get:
ans =
AndroidStudioWorkflowValidator with properties:
AndroidStudioPath: 'C:\Program Files\Android\Android Studio'
AndroidSDKPath: 'C:\Users\MYNAME\AppData\Local\Android\sdk'
GradlePath: []
JavaJDKPath: 'C:\Program Files\Android\Android Studio\jre'
NDKPath: 'C:\Users\MYNAME\AppData\Local\Android\sdk\ndk\24.0.8215888'
ARMComputeLibPath: []
GradleVersion: '6.7.1'
GradlePluginVersion: '4.2.0'
CompileSdkVersion: '33'
BuildToolsVersion: '33.0.0'
SupportV4Version: []
AppcompatV7Version: []
DesignVersion: []
IsCappedVersion: 0
gradleWrapperPath: 'GradleWrapper\wrapper'
Any idea what is going wrong? Thanks!
댓글 수: 0
답변 (1개)
Sutanu Maiti
2022년 6월 13일
Please install the build tools from Android Studio’s SDK manager as shown in the below image :
And the same goes for platform tools and others as mentioned in the Hardware Setup Page. Then, On the Android Hardware Setup Screen First page, please select the ‘Latest Version’ option and proceed further.
댓글 수: 2
Sutanu Maiti
2022년 7월 1일
Even if the 'Test Connection' on the last Hardware Setup screen fails, you can still deploy models on your phone as a standalone application. The only thing you will be missing is the 'Monitor & Tune' and 'Connected IO' features because that requires active communication between MATLAB and the phone.
Just Check if 'prefdir' has the folder 'MWAndroidDeviceInfo' created and inside that folder 'AndroidToolsInfo.json' file and 'wrapper' folder is created or not. To go to 'prefdir' just execute below command in MATLAB:
>> cd(prefdir)
If the mentioned json file and the 'wrapper' folder are present, then you are good at deploying any model.
Poont to be noted:
You need an active internet connection on your host computer while building the 'TestApp' for the very first succesful build. Because gradle synchronizes its tools during the first build.
Once the first build is done, you may create a WiFi hotspot from your phone and connect your pc to that hotspot if possible. That will make both the devices on the same network. And you can use the 'Monitor and Tune' feature.
참고 항목
카테고리
Help Center 및 File Exchange에서 Setup and Configuration에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!