Unable to Build Android test app on Device (Android device support package) - MATLAB R2021a
11 次查看(过去 30 天)
显示 更早的评论
Hello dear friends,
I am having issues when trying to build the test app in hardware setup of Simulink support package for Android devices.
The error for the "Build App" task is as follows:
A problem occurred configuring root project 'TestApp'. > Could not resolve all artifacts for configuration ':classpath'. > Could not find gradle.jar (com.android.tools.build:gradle:3.5.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.jar > Could not find builder.jar (com.android.tools.build:builder:3.5.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.5.0/builder-3.5.0.jar > Could not find builder-test-api.jar (com.android.tools.build:builder-test-api:3.5.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.5.0/builder-test-api-3.5.0.jar > Could not find bundletool.jar (com.android.tools.build:bundletool:0.9.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.9.0/bundletool-0.9.0.jar > Could not find protos.jar (com.android.tools.analytics-library:protos:26.5.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.5.0/protos-26.5.0.jar *
Can anyone help me with it please? I feel free to mention that running the command below results in the mentioned specs:
codertarget.android.internal.AndroidStudioWorkflowValidator.getInstance
ans =
AndroidStudioWorkflowValidator with properties:
AndroidStudioPath: 'C:\Program Files\Android\Android Studio'
AndroidSDKPath: 'C:\Users\STRIX\AppData\Local\Android\sdk'
GradlePath: []
JavaJDKPath: 'C:\Program Files\Android\Android Studio\jre'
NDKPath: 'C:\Users\STRIX\AppData\Local\Android\sdk\ndk\23.0.7196353'
ARMComputeLibPath: [1×5 struct]
GradleVersion: '5.4.1'
GradlePluginVersion: '3.5.0'
CompileSdkVersion: '30'
BuildToolsVersion: '31.0.0 rc2'
SupportV4Version: []
AppcompatV7Version: []
DesignVersion: []
gradleWrapperPath: 'GradleWrapper\wrapper'
1 个评论
Sutanu Maiti
2021-4-8
Hi Mehdi,
Can you please uninstall ndk version 23.* and install 22.*. Also build tools version 30 (not any rc1 / rc2 releases) and try again?
Also please make sure internet connection is up and running while building TestApp, besause gradle downloads certain tools from online during its first build.
Thanks,
Sutanu
回答(1 个)
Sutanu Maiti
2021-4-8
https://www.mathworks.com/matlabcentral/answers/788579-unable-to-build-app-in-verify-configuration-of-your-android-device#comment_1432124
3 个评论
Sutanu Maiti
2021-4-9
Looks like something is stopping gradle to download those jars (it could be the firewall or the antivirus program on that pc) from online repositories.
Can you check if creating new project in Android Studio and build goes through or faces same issue? Try to match (GradlePluginVersion: '3.5.0' and CompileSdkVersion: '30') in your newly created project's build.gradle file.
另请参阅
类别
在 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!