SDK Sample code compile error
CompletedHi,
When building the project, as shown in the tutorial, I have these errors:
ERROR:C:\workspace\Mobile-SDK-Android-V5-dev-sdk-main\SampleCode-V5\android-sdk-v5-uxsdk\build\intermediates\incremental\debugAndroidTest\mergeDebugAndroidTestResources\merged.dir\values\values.xml:148: AAPT: error: resource string/setting_ui_hd_channel_auto (aka dji.v5.ux.test:string/setting_ui_hd_channel_auto) not found.
ERROR:C:\workspace\Mobile-SDK-Android-V5-dev-sdk-main\SampleCode-V5\android-sdk-v5-uxsdk\build\intermediates\incremental\debugAndroidTest\mergeDebugAndroidTestResources\merged.dir\values\values.xml:149: AAPT: error: resource string/setting_ui_hd_channel_custom (aka dji.v5.ux.test:string/setting_ui_hd_channel_custom) not found.
ERROR:C:\workspace\Mobile-SDK-Android-V5-dev-sdk-main\SampleCode-V5\android-sdk-v5-uxsdk\build\intermediates\incremental\debugAndroidTest\mergeDebugAndroidTestResources\merged.dir\values\values.xml:152: AAPT: error: resource string/hdmi_system_setting_mode_same (aka dji.v5.ux.test:string/hdmi_system_setting_mode_same) not found.
ERROR:C:\workspace\Mobile-SDK-Android-V5-dev-sdk-main\SampleCode-V5\android-sdk-v5-uxsdk\build\intermediates\incremental\debugAndroidTest\mergeDebugAndroidTestResources\merged.dir\values\values.xml:153: AAPT: error: resource string/hdmi_system_setting_mode_fpv (aka dji.v5.ux.test:string/hdmi_system_setting_mode_fpv) not found.
I'm running:
Android Studio Iguana | 2023.2.1 Patch 1
Runtime version: 17.0.9+0--11185874 amd64
Any idea?
-
Hi,
After adding 'android.nonTransitiveRClass = false', you can check if the Gradle version is 7.6.2, and we recommend adjusting your JDK version to 17.
Didn't help, same errors. Any idea?
I also realized that the Mobile-SDK-Android-V5 project is in a Dev branch in the repo. Does this mean that this demo may be buggy? What is the recommended sample project and tutorial recommended for learning the UXSDK today? Should i be using Android-UXSDKDemo?
-
If you are still encountering this issue, I recommend rebuilding this project. The "dev" is a name, it is indeed the latest sample code branch released by DJI. For UXSDK, the UXSDK of MSDK V5 is an open-source library, and you can see all the code in the sample code. Android-UXSDKDemo is the UXSDK sample code for MSDK V4. -
I found the solution of my issue.
Try to check version of sofware and libraries. for me it is :
- android-studio-2022.3.1.18-windows
- gradle version : 7.6.2
- android gradle plugin version: 7.4.2
- gradle jdk: correto 11
But it wasn't the problem for me. The problem was that there was a string variable in my values/string.xml that was added to have a dynamic text in one kotlin class. This could be an avenue of research for you.
Also try clean and rebuild project -
The information missing in the string file used by the sample code is because this information is not supposed to be placed in the MSDK. I have already reported this issue to the team, and the resources file of UXSDK should be placed within the UXSDK library. However, even without making changes, it can still be compiled. If you are still unable to compile, perhaps adding this part to the string file is also a solution.
Please sign in to leave a comment.
Comments
10 comments