cancel
Showing results for 
Search instead for 
Did you mean: 

Building MDK Client 23.4.1 plugin error

tomislav_cesnik
Explorer
0 Kudos

Hi,

Im trying to build SAP Service and Asset Manager client 23.4.2 for Android on Windows 10 but client creation fails with ui-material-core plugin error.

1. create-client.cmd

FAILURE: Build failed with an exception.

* What went wrong:
Could not open settings generic class cache for settings file 'D:\MDK\MDK23_42\MDKClient_SDK\SvcAssetMgr\platforms\tempPlugin\ui_material_core\settings.gradle' (C:\Users\user\.gradle\caches\7.5\scripts\8sdhpe2wp0g8pmqmpmc4rz2gv).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 64

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4s
Failed to build plugin @nativescript-community/ui-material-core :
Error: Command gradlew.bat failed with exit code 1

Error: Failed to run ns build android<br>

2. Documentation

All the steps i did was from this guide:

Working with the Mobile Development Kit | SAP Help Portal

SAP Service and Asset Manager Installation Guide (Document Version: 2305 – 2023-07-27)

3. Download files (latest versions on this day)

ASSETMGRMTADTA00_0-80008483.ZIP

ASSTMGRBRNDSDK00_0-70007795.ZIP

MDKCLNT2304P_1-70007923.ZIP

MDKPLG_SDK_AND00P_100-70007792.ZIP

Any help would be appreciated.

Thanks

Tomislav

muhammad_rafay
Advisor
Advisor
0 Kudos

Is this the first time you are building the client? Did you verify using the MDK installer if all the dependencies are correct? What version of Java are you using? The issue seems to be with the Gradle command so could be cached from the previous build or one of the dependencies is not correct.

tomislav_cesnik
Explorer
0 Kudos

Hi Muhammad,

This is the third run i have tried to build the client but every time with the same error (tried with restarting PC)

MDK_Dependencies_Installer.exe passed with all the green flags.

Java version is 20.0.2 as stated in the official documentation for version 2305.

Your answer made me do some resarch and i found gradle should be updated using the matrix from the link:

Compatibility Matrix (gradle.org)

So i tried to update is because current version was 7.5

D:\MDK\MDK23_42\MDKClient_SDK\SvcAssetMgr\platforms\android>gradlew wrapper --gradle-version latest

Result is the same error as before.

I also tried clearing the cache + PC restart and still the problem remains 😞

Thanks

abuzar1
Discoverer
0 Kudos

HI Thomislav,
Can you please cross check the followings

// add gradle dependencies here
project.ext {
    googlePlayServicesVersion = "16.+"
}
dependencies {
    def googlePlayServicesVersion = project.googlePlayServicesVersion
    implementation "com.google.android.gms:play-services-location:$googlePlayServicesVersion"
}
android {
    defaultConfig {
        minSdkVersion 29
        targetSdkVersion 31
    }
}

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

There are currently issues using Java 20 for MDK especially on Windows. While the MDK Dependency installer says JDK >= 11 the highest supported is really Java 17. MDK 23.8 lists JDK as >= 11.0.0 and <= 17.99.99.

Please try with a different Java version and let us know if that helps.

tomislav_cesnik
Explorer
0 Kudos

Hi Bill,

Created a fresh start using:

JDK 17.0.8 (home is now set to jdk-17)

MDK Client 23.8.0 (MDKCLNT23808_0-80008652)

new 23.8.0 MDK_Dependencies_Installer wanted a new version of Native script 8.5.3 instead of 8.4.0.

---

New error during create-client:

Compiling plugin TypeScript code
plugins/extension-BarcodeScanner_Plugin-BarcodeScanner/BarcodeScanner/BarcodeScannerManager.android.ts(7,12): error TS2610: 'nativeView' is defined as an accessor in class 'View', but is overridden here in 'BarcodeScanner' as an instance property.
plugins/extension-DocumentEditor_Plugin-DocumentEditor/DocumentEditorControl/DocumentEditorControl.android.ts(8,12): error TS2610: 'nativeView' is defined as an accessor in class 'View', but is overridden here in 'DocumentEditorControl' as an instance property.
plugins/extension-HierarchyFramework_Plugin-HierarchyFramework/HierarchyControl/HierarchyControlManager.android.ts(7,12): error TS2610: 'nativeView' is defined as an accessor in class 'View', but is overridden here in 'HierarchyControl' as an instance property.
plugins/extension-MapFramework_Plugin-MapFramework/Map/MapManager.android.ts(12,12): error TS2610: 'nativeView' is defined as an accessor in class 'View', but is overridden here in 'Map' as an instance property.
plugins/extension-PDFFramework_Plugin-PDFFramework/PDFControl/PDFControlManager.android.ts(7,12): error TS2610: 'nativeView' is defined as an accessor in class 'View', but is overridden here in 'PDFControl' as an instance property.
plugins/extension-ProgressTrackerFramework_Plugin-ProgressTrackerFramework/ProgressTrackerControl/ProgressTrackerControlManager.android.ts(7,12): error TS2610: 'nativeView' is defined as an accessor in class 'View', but is overridden here in 'ProgressTrackerControl' as an instance property.

Error: Failed to compile plugin TypeScript code.

As per latest SAP SAM guide i copied extensions from MDKPLG_SDK_AND00P_100-70007792\Universal to my SAPAssetManager\SAM.mdkproject\extensions folder.

Latest note is still not listing version 23.8 so i used latest plugins (mdkplg_sdk_and00p_100-70007792.zip).

Thanks,

Tomislav.

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Asset Manager has not released support for MDK 23.8.0 yet so if you are targeting a client for SAM you should say with supported combinations from their support matrix.

tomislav_cesnik
Explorer
0 Kudos

Hi,

Thank you for the help.

I have successfully made a client using JDK 17.0.8 and Native Script 8.5.3 using the 23.4.1 MDK Client.

All other file versions (metada,plugins,client,branding) are as writen in official instalation manual for version 2305.

The issue i'm facing now is during MDK: bundle build from VSCode.

Tried using MDK Extension 1.25.2 and 1.23.0 for VSCode 1.81.1 (latest for today)

webpack 5.76.2 compiled with 10 errors in 24062 ms
ModuleNotFoundError: Module not found: Error: Can't resolve 'uuid' in 'C:\Users\USER\build.definitions\SAPAssetManager\Rules\Common',ModuleNotFoundError: Module not found: Error: Can't resolve 'uuid' in 'C:\Users\USER\build.definitions\SAPAssetManager\Rules\Common',ModuleNotFoundError: Module not found: Error: Can't resolve '@nativescript/core/accessibility' in 'C:\Users\USER\build.definitions\SAPAssetManager\Rules\Forms\FSM',ModuleNotFoundError: Module not found: Error: Can't resolve 'uuid' in 'C:\Users\USER\build.definitions\SAPAssetManager\Rules\Forms\FSM',ModuleNotFoundError: Module not found: Error: Can't resolve 'extension-LocationService' in 'C:\Users\USER\build.definitions\SAPAssetManager\Rules\LocationTracking',ModuleNotFoundError: Module not found: Error: Can't resolve '@nativescript/geolocation' in 'C:\Users\USER\build.definitions\SAPAssetManager\Rules\LocationTracking\Services',ModuleNotFoundError: Module not found: Error: Can't resolve '@nativescript/geolocation' in 'C:\Users\USER\build.definitions\SAPAssetManager\Rules\LocationTracking\Services',ModuleNotFoundError: Module not found: Error: Can't resolve '@nativescript/geolocation' in 'C:\Users\USER\build.definitions\SAPAssetManager\Rules\LocationTracking\Services',ModuleNotFoundError: Module not found: Error: Can't resolve '@nativescript/geolocation' in 'C:\Users\USER\build.definitions\SAPAssetManager\Rules\LocationTracking\Services',ModuleNotFoundError: Module not found: Error: Can't resolve '@nativescript/core/accessibility' in 'C:\Users\USER\build.definitions\SAPAssetManager\Rules\TimelineControl'
undefined
bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

You need to specify the mdk externals in your settings. The values can be taken from the MDKProject.json and set in the VSCode settings.

tomislav_cesnik
Explorer
0 Kudos

Could you please provide some details or link to the documentation on how and what to change inside of MDKProject.json?

Thanks

bill_froelich
Product and Topic Expert
Product and Topic Expert

The MDKProject.json does not need to change. In the MDKProject.json there is the Externals reference which is an array of values.

  1. Copy the list of values in the External array. Do not copy the square brackets.
  2. In VSCode, open settings and search for mdk
  3. For Mdk: Bundler Externals click the "Edit in settings.json" link
  4. Paste the values copied from MDKProject.json
  5. Re-execute your MDK: bundle build in VSCode
tomislav_cesnik
Explorer
0 Kudos

Thank you Bill,

your answer was the solution.

This is what i have added in settings.json

"mdk.bundlerExternals": [ "@nativescript/geolocation", "extension-LocationService", "extension-GenericWebView", "uuid", "@nstudio/nativescript-dynatrace", "@nativescript/core/accessibility" ],

Answers (0)