Build error using ionic cordova build android


#1


I’m trying to build and run my app for testing but I cant seem to bypass the build command. I used

ionic cordova build android
Ionic info:
cli packages: (C:\Users\USER\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.1.5
    Cordova Platforms  : android 6.3.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node : v8.9.1
    npm  : 5.5.1
    OS   : Windows 10
Cordova requirements:
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed Google Inc.:Google APIs:23,android-26,android-24,android-23,android-22
Gradle: installed C:\Program Files\Android\Android Studio1\gradle\gradle-3.3\bin\gradle

In the error I could see it is referring that cordova fileutils is missing

C:\wamp64\www\rock_wood\platforms\android\src\com\synconset\cordovahttp\CordovaHttpDownload.java:18: error: package org.apache.cordova.file does not exist
import org.apache.cordova.file.FileUtils;

If this is the error how can I add the missing file? please help.


#2

What plugins are you using?
ionic cordova plugin list


#3

@Sujan12 cordova plugin list:

cordova-plugin-advanced-http 1.9.0 "Advanced HTTP plugin"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-file 5.0.0 "File"
cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 1.3.4 "Network Information"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-whitelist 1.3.1 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"

#4

I changed some settings while looking on the internet and now my ionic info looks like

cli packages: (C:\Users\USER\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.1.5
    Cordova Platforms  : android 6.1.2
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node : v8.9.1
    npm  : 4.6.1
    OS   : Windows 10

changes took place:
npm : 5.5.1 to 4.6.1
android 6.3.0 to 6.1.2


#5

This should be at least 6.4.0.

Remove the file plugin and see if it builds then.


#6

@sujan12 thanks changing the android version to 6.4.0 fixed my problem.
When I was successful in deploying the app to my device… I noticed that the swipe function for accessing the sidemenu is not working. But when I come back to the browser for testing, the swipe function to access sidemenu works. Is there a fix to it? or this is the way it supposed to be


#7

Please open a new topic for this unrelated problem.