Hi Experts,
I have developed plugin , i have not published the plugin.
How can i give local reference/path of plugin when building MDK client?
Please suggest.
Regards
Manish
Request clarification before answering.
Manish,
Taking a look at your .mdkrpoject folder structure there are a few things that need adjustment to match the sample. I think once you get these adjusted your plugin will be installed. In particular, the extensions folder can contain multiple extension controls. Therefore each extension control needs to be contained in their own folder with a common structure for each one. I have mocked up your project with the updated structure.

Additionally, the NSPlugins reference in the MDKProject.json will attempt to add the plugin from the public repositories. If you plugin is in the extensions folder you should not list it in the NSPlugins. I would also recommend you use a bundle id that is unique to your organization to avoid any possible conflicts with SAP created apps.
Your package.json also needs to reference the Nativescript versions instead of the MDK version. Here is an updated version that I think is correct for your plugin.

Give this a shot and let me know if this fixes the install issue.
--Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi bill.froelich
Thanks , i am able to proceed , now when i install it on device it is conflicting with my Android manifest file,
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
any idea on resolving android manifest error , i tried to replace but does not work ?
/Users/manishmeshram/Downloads/MDK_SDK_5_1_5_001_Notarized/MDKClient_SDK/RF MDK Client/platforms/android/app/src/main/AndroidManifest.xml:22:3-32 Error:
Attribute application@icon value=(@drawable/icon) from AndroidManifest.xml:22:3-32
is also present at [:app-release:] AndroidManifest.xml:13:9-43 value=(@mipmap/ic_launcher).
Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml:18:2-68:16 to override.
/Users/manishmeshram/Downloads/MDK_SDK_5_1_5_001_Notarized/MDKClient_SDK/RF MDK Client/platforms/android/app/src/main/AndroidManifest.xml:23:3-39 Error:
Attribute application@label value=(@string/mdk_app_name) from AndroidManifest.xml:23:3-39
is also present at [:app-release:] AndroidManifest.xml:14:9-41 value=(@string/app_name).
Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:18:2-68:16 to override.
Execution failed for task ':app:processDebugManifest'.
Manifest merger failed with multiple errors, see logs
Unable to apply changes on device: 18214522503092. Error is: Command ./gradlew failed with exit code 1.
Hi bill.froelich
It worked by modifying my manifest, when plugin got installed it added as "CraveInfoTechScanner_craveinfotech-zebra-scanner" in plugin folder.
When i call my plugin functions in MDK rule should i reference it as "craveinfotech-zebra-scanner" or "CraveInfoTechScanner_craveinfotech-zebra-scanner"?
Example : var ZebraPlugin = require("craveinfotech-zebra-scanner");
Regards,
Manish
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.