Problem with ionic-plugin-keyboard

Hello,

I have ionic 1 app.

I am invoking following command:
ionic cordova platform add android

and I am getting following exception

It is important that I am getting that exception for android5 6 and 7.

Installing “ionic-plugin-keyboard” for android

Error during processing of action! Attempting to revert…

Failed to install ‘ionic-plugin-keyboard’: CordovaError: Uh oh!
“c:\Apps\farm-client\client\platforms\android\src\io\ionic\keyboard\IonicKeyboard.java” already exists!
at copyNewFile (c:\Apps\farm-client\client\platforms\android\cordova\lib\pluginHandlers.js:232:15)
at install (c:\Apps\farm-client\client\platforms\android\cordova\lib\pluginHandlers.js:37:17)
at Object.process (c:\Apps\farm-client\client\platforms\android\cordova\node_modules\cordova-common\src\ActionStack.js:56:25)
at PluginManager.doOperation (c:\Apps\farm-client\client\platforms\android\cordova\node_modules\cordova-common\src\PluginManager.js:117:20)
at PluginManager.addPlugin (c:\Apps\farm-client\client\platforms\android\cordova\node_modules\cordova-common\src\PluginManager.js:147:17)
at Api.addPlugin (c:\Apps\farm-client\client\platforms\android\cordova\Api.js:198:10)
at handleInstall (C:\Users\sokoloj1\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\install.js:594:10)
at C:\Users\sokoloj1\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\install.js:357:28
at _fulfilled (C:\Users\sokoloj1\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\sokoloj1\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)

(node:7820) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Uh oh!
“c:\Apps\farm-client\client\platforms\android\src\io\ionic\keyboard\IonicKeyboard.java” already exists!

Here is my ionic info:

@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

Cordova Platforms : android 5.2.2 browser 4.0.0
Ionic Framework   : ionic1 1.2.4

System:

Android SDK Tools : 26.1.1
Node              : v6.11.0
npm               : 5.0.4
OS                : Windows 7

Environment Variables:

ANDROID_HOME : C:\Users\sokoloj1\AppData\Local\Android\Sdk

Misc:

backend : pro

Thank you for your help

Best Regards,Jakub

I have managed to solve a problem when adding androdid-26 to android sdk. So problem was that my ionic project was targeted to androdi-26 and on android sdk side I have installled only android-27.

1 Like

Hello @jrsokolow I have the same problem, but I don’t clearly understand your answer…
When I add the android platform to my projects says this:
Creating Cordova project for the Android platform:
Path: platforms/android
Package: com.estudiocactus.porcelanosapartners
Name: Partners
Activity: MainActivity
Android target: android-26

It has to be “Android target: android-27” ??

Because I’m not able to get updated the Android target version of my Ionic project.

How did you achieve this?

Thank you