MATLAB Answers

Android API version error while building simulink app in android device

14 views (last 30 days)
Hi,
I am trying to build and deploy my simulink app in my android device with android version 10 (API 29) and I am getting the following error:
Android NDK: WARNING: APP_PLATFORM android-17 is higher than android:minSdkVersion 1
If I select 'Monitor and Tune' from the hardware pane, the app runs perfectly fine in the device. Also, while setting up the device, the Android studio checks if your device is able to run the app by building, installing and running a sample app and that also worked well.
By following the answers to the relative questions on matlab help, I made the following changes in the build.gradle file (these changes can also be made through Android Studio. It just edits the build.gradle file):
compileSdkVersion 29
buildToolsVersion '29.0.3'
and, minSdkVersion 17
targetSdkVersion 29
Also, tried inputting minSdkVersion 1 for trial and error purpose but getting the same error.

  0 Comments

Sign in to comment.

Accepted Answer

Sutanu Maiti
Sutanu Maiti on 22 May 2020
Thats a warning not an error. warnings does not stop build process. Error message must be below to that. Can you please copy entire error message from diagonostic viewer to here?

  4 Comments

Show 1 older comment
Ilya Makarov
Ilya Makarov on 7 Dec 2020
Dear Sutanu, i have the same problem. I think the problem is that the name of my temporary folder on my host machine contains cyrillic symbols which the TestApp possibly doesnt recognize. Could you please inform how i can change the folder path in the TestApp?
Sutanu Maiti
Sutanu Maiti on 8 Dec 2020
Hi Ilya,
Please execute below commands in MATLAB before running Hardware Setup.
>> clear tempdir;
>> setenv('TMP', <temp_dir>);
where <temp_dir> is an absolute path of a valid folder that does not have space or special characters.
The TestApp is build in systems 'temp' folder which might be 'C:\Users\<User Name>\AppData\Local\Temp' In your case.
This can also be changed by updating System environment variable 'TEMP' and/or 'TMP'.
Also, you can execute 'tempdir' command in MATLAB to make sure 'temp' folder path is updated.
Once, 'temp' folder path is updated, you may run Hardware Setup again and that must go through.

Sign in to comment.

More Answers (0)

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!