Ionic build issue showing an error


#1

when i run the code ionic cordova build android .
showing an error
Error look like this
An error occurred while running cordova prepare android (exit code 1)
How can i fix it.

Error.
buildError

Please help me anyone.


#2

Maybe your folder path have problem. The folder named all demo download from internet have space.
Try to move your project to a unspaced folder name like F:\drquochoai\Ionic2_Geofen... and try to build again.


#3

Sir, when i serve its working fine.but when build ionic cordova build android showin this error .

Failed to restore plugin "cordova-plugin-geofence-test" from config.xml. You mig
ht need to try adding it again. Error: --fetch does not support subdirectories

Discovered plugin "cordova-plugin-geolocation-tests" in config.xml. Adding it to
 the project
support for subdirectories is deprecated and will be removed in Cordova@7

i want to know cordova-plugin-geofence-test this plugin exist?


#4

Hi @flycoders_sourav
But the fact that build does not work. I had the same problem like you before. Try my solution please.
Update:
cordova-plugin-geofence-test is not exist in the internet, but cordova-plugin-geofence does. So you can delete the word -test at the end of this plugin name in config.xml and run cordova prepare to fix plugin problem.


#5

Sir,its still showing error

please check my error
Error
errerrr

config.xml

<engine name="android" spec="^6.2.3" />
    <plugin name="cordova-plugin-console" spec="^1.0.7" />
    <plugin name="cordova-plugin-device" spec="^1.1.6" />
    <plugin name="cordova-plugin-device-tests" spec="file:plugins\cordova-plugin-device\tests" />
    <plugin name="cordova-plugin-geofence" spec="^0.7.0" />
    <plugin name="cordova-plugin-geofence-test" spec="https://github.com/cowbell/cordova-plugin-geofence.git#:/tests" />
    <plugin name="cordova-plugin-geolocation" spec="^2.1.0" />
    <plugin name="cordova-plugin-geolocation-tests" spec="http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation#:/tests" />
    <plugin name="cordova-plugin-splashscreen" spec="^3.1.0" />
    <plugin name="cordova-plugin-statusbar" spec="^2.1.3" />
    <plugin name="cordova-plugin-test-framework" spec="^1.1.5" />
    <plugin name="cordova-plugin-whitelist" spec="^1.2.2" />
    <plugin name="ionic-plugin-keyboard" spec="^1.0.9" />

please help me sir.


#6

remove the line and try again please

    <plugin name="cordova-plugin-geofence-test" spec="https://github.com/cowbell/cordova-plugin-geofence.git#:/tests" />

#7

i have been try. but when cordova prepare is run That time Automatic generate the file<plugin name="cordova-plugin-geofence-test" spec="https://github.com/cowbell/cordova-plugin-geofence.git#:/tests" />
into the config.xml.


#8

try to run ionic cordova plugin remove cordova-plugin-geofence-test and try again


#9

When i remove the plugin showing this error.
err2


#10

What did cordova plugin list output?


#11

ls

Sir,Actually this code download from git.


#12

There is no cordova-plugin-geofence-test plugin, so you can not remove it.