Apk doesn't work in android plz help?

Ionic apk is not working displaying

connection to server was unsucessful…

and in console I am getting

console.log: Channel not fired: onPluginsReady
console.log: Channel not fired: onCordovaReady
console.log: Channel not fired: onDOMContentLoaded 

What command are you running to build the apk?

hey thanks for replying
cordova build android

You need to use ionic build <platform> for app-scripts to compile the code, have you tried that?

I trid but its not working in mine will work with cordova only or ionic cordova build android

Are you getting an error when using it? :slight_smile:

ionic build android
The build command has been renamed. To find out more, run:

ionic cordova build --help

you can use ionic run android or ionic cordova run android. This will generate apk and will show you path.

Could you run ionic info please?

In CLI v3, ionic build has been replaced by ionic cordova build, which you would have learned if you ran ionic cordova build --help as the nice error message suggested.

1 Like

yes its replaced but does it really affect on apk

I got following messages

global packages:

@ionic/cli-utils : 1.0.0-rc.2
Cordova CLI      : 6.5.0 
Ionic CLI        : 3.0.0-rc.2

local packages:

@ionic/app-scripts              : 1.3.7
@ionic/cli-plugin-cordova       : 1.0.0-rc.2
@ionic/cli-plugin-ionic-angular : 1.0.0-rc.2
Ionic Framework                 : ionic-angular 3.1.1

System:

Node       : v6.10.2
OS         : Linux 4.4
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed

It’s generating apk but when I open that apk it is showing that application error connection to the server was unsuccessful

hey did u got the solution for this error I mean please let me know…