Android Build error on IonicKeyboard plugin

Im building a simple application for a project in my university with Ionic and all was going very good until yesterday, i used the common command ionic build android and threw me an -Xlint error on the IonicKeyboard plugin…

Till yesterday i did not have any of these warnings and built normally with ant and tested the apk normally. after that error i updated the android studio and now it builds my app with gradle and the resulting apk has now different name than previously, on different folder and ofcourse it doesnt work when i test it on physical device anymore (no changes in the source code at all from before and after -Xlint) now after so many hours of searching i:

  • ionic platform remove android.
  • Reinstalled Android Studio.
  • npm clean cache.
    Also my app runs successfully on ionic serve and serve --lab I really dont know what else to do, if you need more information ask me, even though i dont really know how did it switch to gradle from ant.

P.S. (ionic and cordova cli’s are updated also npm version is 0.12 and android has installed build-tools(22.0.1), sdk-tools(24.2) and platform-tools(22) and have ANT_HOME and Java_HOME in environment variables.

Here is also a capture from -Xlint error:
image

That screenshot says BUILD SUCCESSFUL.

Yea, but when i put the apk into a physical device or run it on Genymotion emulator it doesnt work and the size of the apk is way smaller than before.

P.S. it runs but its like empty.

I have no way to guess why your app is not working I’m afraid, all I can tell you is that there’s nothing wrong with that build log: the deprecated API warning is just a warning, I always get the same.

Isnt’t there a way to kind of “reset” everything other than reinstalling (which i did on android)? I mean the Ionic/cordova/npm and android configurations?

Hi Shiroe-Shin, I get the same issue and removing the keyboard plugin seems to do the trick. My app crashes unless I run this command, even though the build is successful.

cordova plugin remove com.ionic.keyboard

Cheers

I kind of found what the problem is even though still havent figured how to fix it. Basically what happened was that at some moment an update to either cordova CLI or android studio (not sure which) changed some configuration of the project Target SDK version so anything above 19 wouldnt work with gradle… luckily i still had a previous folder with a project that i was building on Target 19 with ant and moved my www folder there compiled from there and it compiled with ant like before. This is my temporary solution right now because i have a deadline tommorow, but im eager to fix this thing.

I hope this cleared up a bit the situation and maybe someone can help me revert those changes…