The number of method references in a .dex file cannot exceed 64K.
arturikoX opened this issue · comments
Which platform(s) does your issue occur on?
- Android
- emulator
Please, provide the following version numbers that your issue occurs with:
version 1.0.0 provides an error :
Execution failed for task ':app:mergeDexDebug'.
Error: null, Cannot fit requested classes in a single dex file (# methods: 69926 > 65536)
How can I fix it ?
Thanks
Hi, are you sure this issue is related to this plugin?
You have too many methods. There can only be 65536 methods for dex.
Yeah,
I fixed the error with
multiDexEnabled true
but then the plugin not working..
registerSoftKeyboardCallback never called..
I cannot reproduce it. You can try to run demo from https://github.com/liuy97/nativescript-soft-keyboard/tree/ns6-plugin/demo-angular.
Hi, I did
tns prepare android
and got :
ERROR in ../src/ns-soft-keyboard.ts:10:33 - error TS2304: Cannot find name 'com'.
softKeyboardProvider = new (com as any).hold1.keyboardheightprovider.KeyboardHeightProvider(args.activity);
../src/ns-soft-keyboard.ts:11:27 - error TS2304: Cannot find name 'com'.
const listener = new (com as any).hold1.keyboardheightprovider.KeyboardHeightProvider.KeyboardListener({
../src/ns-soft-keyboard.ts:33:57 - error TS2304: Cannot find name 'UIKeyboardDidShowNotification'.
softKeyboardProvider = iosApp.addNotificationObserver(UIKeyboardDidShowNotification, (event) => {
../src/ns-soft-keyboard.ts:34:55 - error TS2304: Cannot find name 'UIKeyboardFrameEndUserInfoKey'.
const height: string = event.userInfo.valueForKey(UIKeyboardFrameEndUserInfoKey).CGRectValue.size.height.toString();
../src/references.d.ts:1:22 - error TS6053: File 'C:/Users/Artur/Desktop/nativescript-soft-keyboard/nativescript-soft-keyboard-ns6-plugin/src/node_modules/tns-platform-declarations/ios.d.ts' not found.
/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
../src/references.d.ts:2:22 - error TS6053: File 'C:/Users/Artur/Desktop/nativescript-soft-keyboard/nativescript-soft-keyboard-ns6-plugin/src/node_modules/tns-platform-declarations/android.d.ts' not found.
/// <reference path="./node_modules/tns-platform-declarations/android.d.ts" />
Thank you for your try !
Hi, package.json is required to fix source of this plugin, if you don't know how to build plugin.
change
to
"nativescript-soft-keyboard": "^1.0.0",
I managed to make it work by isolate the demo folder from other, and indeed it works...
Thanks !