Apk doesn't work in android plz help?


#1

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 

#2

What command are you running to build the apk?


#3

hey thanks for replying
cordova build android


#4

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


#5

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


#6

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


#7

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

ionic cordova build --help


#8

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


#9

Could you run ionic info please?


#10

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.


#11

yes its replaced but does it really affect on apk


#12

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

#13

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


#14

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