FAILURE: Build failed with an exception in ionic 4

2019-07-31 15:08发布

问题:

I have created an app called phone(ionic v-4). I have tried to implement Phone authentication i,e OTP verification using firebase by following this article in the medium.

Now i tried to deploy my app(phone) in my android device, using below command.

ionic cordova run android

I am getting this error:

But the app runs fine in the browser.

I am unable to perceive the error.

回答1:

Do try to remove and add again the Android platform

ionic cordova platform rm android
ionic cordova platform add android


回答2:

Do this:

 ionic cordova plugin rm cordova-plugin-firebase



 ionic cordova plugin add https://github.com/dpa99c/cordova-plugin-firebase#GH-1057-April-05-android-build-issue

and see this link

Ionic build issue -firebase