cancel
Showing results for 
Search instead for 
Did you mean: 

Error building MDK client using MDK SDK

eduardo_espinosa
Explorer
0 Kudos

Hi Team.

I am currently trying to create a MDK client in Windows following the instructions of this tutorial:

Build Your Mobile Development Kit Client Using MDK SDK:

https://developers.sap.com/tutorials/cp-mobile-dev-kit-build-client.html

And I am having the following error:

------------------------ZIP INCLUDE.GRADLE-------------------------------- D:\mdk\MDK_SDK_4_2_5_Notarized\MDKClient_SDK\XXXXXXXXXXXXXX\platforms\android\app + applying user-defined configuration from D:\mdk\MDK_SDK_4_2_5_Notarized\MDKClient_SDK\XXXXXXXXXXXXXX\app\App_Resources\Android\app.gradle

---------------------------APP.GRADLE---------------------------------

D:\mdk\MDK_SDK_4_2_5_Notarized\MDKClient_SDK\XXXXXXXXXXXXXX\platforms\android\app

+ using android X library androidx.legacy:legacy-support-v4:1.0.0

+ adding nativescript runtime package dependency: nativescript-optimized-with-inspector

+ adding aar plugin dependency: D:\mdk\MDK_SDK_4_2_5_Notarized\MDKClient_SDK\XXXXXXXXXXXXXX\node_modules\mdk-sap\platforms\android\cloud_mobile_foundation-release.aar

+ adding aar plugin dependency: D:\mdk\MDK_SDK_4_2_5_Notarized\MDKClient_SDK\XXXXXXXXXXXXXX\node_modules\mdk-sap\platforms\android\cloud_mobile_odata-release.aar

+ adding aar plugin dependency: D:\mdk\MDK_SDK_4_2_5_Notarized\MDKClient_SDK\XXXXXXXXXXXXXX\node_modules\mdk-sap\platforms\android\cloud_mobile_ui-release.aar

<======-------> 52% EXECUTING [10m 52s]: D:\mdk\MDK_SDK_4_2_5_Notarized\MDKClient_SDK\XXXXXXXXXXXXXX<======-------> 52% E

Execution failed for task ':app:desugarDebugFileDependencies'. Cannot parse result path string:

Unable to apply changes on device: emulator-5554. Error is: Command gradlew.bat failed with exit code 1.

The same error happens if I run it for emulator or for the connected device.

I have already check some blogs for the error, but even installing again the Build Tool directory for the recommended version (28), is not working for me:

https://stackoverflow.com/questions/59509560/execution-failed-for-task-appdesugardebugfiledependenci...

Thanks in advance for your help and comments

Best Regards

Eduardo

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

eduardo.espinosa

Could you check once if MDK Dependency Installer checks all the required per-requisite successfully?

eduardo_espinosa
Explorer
0 Kudos

Hi Jitendra.

I have executed again the MDK Dependency Installer and it was weird because it was saying that the Node.js component was not installed, and saying that current one was too high (Version 13). So I installed again (Version 10) from the tool without errors, but closing and running again, the tool it was saying that again I had version 13. So I had to remove node.js from the Control Panel, restart Windows and I installed again all the components from the tool, an then all component versions were ok.

Then I ran the "create-client command" without issues. But when running the "tns run ..." command, the same ":app:desugarDebugFileDependencies" error appears.

What I currently need is a way for debugging MDK app rules in Windows 10.

In order to debug an attached device, I have also tried the execute Cloud Build with the idea of attaching my android device in VS Code and debug it in this way. In Mobile Services Cockpit at the Cloud Build Feature of the App, the normal build works well for MDK with Android Signing Profile generated locally. But if with the same Cloud Build settings I just additionally mark the "Build Options" : "Create Debug-enabled Binaries" check box, the job execution fails (Also at the "gradelew" script):

"...Command ./gradlew failed with exit code 1 Error: Command ./gradlew failed with exit code 1 at Errors.failWithOptions (/opt/node/lib/node_modules/nativescript/lib/common/errors.js:147:28) at Errors.fail (/opt/node/lib/node_modules/nativescript/lib/common/errors.js:120:21) at GradleCommandService.<anonymous> (/opt/node/lib/node_modules/nativescript/lib/services/android/gradle-command-service.js:35:30) at Generator.throw (<anonymous>) at rejected (/opt/node/lib/node_modules/nativescript/lib/services/android/gradle-command-service.js:5:65) at process._tickCallback (internal/process/next_tick.js:68:7) [2020-07-06 22:17:16.03863] [IT] [LogToken] [Command Return Value: 127] [] [CBS\Utils\Utility::execCommand] [2020-07-06 22:17:16.03871] [IT] [LogToken] [Finished Executing Command: tns --log trace build android --copy-to /mnt/workspace/CRPMobileApplication.apk] [] [CBS\Utils\Utility::execCommand] [2020-07-06 22:17:16.04632] [IT] [LogToken] [BUILD: FAILURE] [] [NativeScript+>build] ..."

It seems that the issue is related with gradle and the related versions or dependencies.

Please comment what I could do from my side. As I say, what I need is to have a way for debugging an MDK app from Windows 10.

Thanks and Best Regards

Eduardo

mingkho
Advisor
Advisor
0 Kudos

Can you add the following param to the tns run command in the command line:

--log trace > tns_log.txt 2 > &1

e.g.

tns run android --emulator --log trace > tns_log.txt 2 > &1

The resulting verbose log will be in the tns_log.txt, it might give more details on the error.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

eduardo.espinosa

Were you able to resolve your issue? You can post an answer so others might benefit from your findings.

Regards, Jitendra (SAP Community Moderator)

Accepted Solutions (0)

Answers (0)