liuy97 / nativescript-soft-keyboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The number of method references in a .dex file cannot exceed 64K.

arturikoX opened this issue · comments

commented

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?

commented

Yeah,
I fixed the error with
multiDexEnabled true

but then the plugin not working..
registerSoftKeyboardCallback never called..

commented

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

"nativescript-soft-keyboard": "file:../src",

to

"nativescript-soft-keyboard": "^1.0.0",

commented

I managed to make it work by isolate the demo folder from other, and indeed it works...
Thanks !