Nouf
October 28, 2017, 10:55am
4
So this is my info
Your system information:
Cordova CLI: 7.0.0
Ionic Framework Version: 2.0.0-rc.5
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.0.0
ios-deploy version: Not installed
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v7.10.0
Xcode version: Xcode 8.3.3 Build version 8E3004b
Could you build before?
Can you build a new project created with ionic start?
yes to both question
And Android Studio SDK tool: 26.0.2 and API 26
Sujan12
October 28, 2017, 11:07am
5
Nouf:
Cordova CLI: 7.0.0
Ionic Framework Version: 2.0.0-rc.5
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.0.0
This is all so old that I am surprise anything works at all.
Update.
Nouf
October 28, 2017, 11:10am
6
Sujan12:
Update
my next question going to shock you but I do not know how
is this sudo npm update -g cordova ionic the right command ?
Sujan12
October 28, 2017, 11:25am
7
This will update Cordova and Ionic CLI.
Framework and app-scripts are in package.json, local to the project.
Nouf
October 28, 2017, 11:41am
8
olay I have update Cordova and Ionic CLI
local packages:
@ionic/app-scripts : 3.0.1
Cordova Platforms : android 6.3.0
Ionic Framework : ionic-angular 3.8.0
System:
ios-sim : 5.0.13
Node : v6.11.5
npm : 3.10.10
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-26,android-25,android-24,android-22,android-21
Gradle: installed /Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle
but when I try ionic cordova run android I still get
the error "JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
Error: spawn EACCES
[ERROR] An error occurred while running cordova run android (exit code 1)."
Sujan12
October 28, 2017, 11:43am
9
Do you get the same error when you run cordova build android --verbose --debug
? Additional maybe interesting output?
What Android Studio version do you have installed?
Saravkl
October 28, 2017, 11:46am
10
i faced same .
added these lines in “build.gradle” file
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details →
def requested = details.requested
if (requested.group == ‘com.android.support’) {
if (!requested.name.startsWith(“multidex”)) {
details.useVersion ‘25.3.1’
}
}
}
}
Nouf
October 28, 2017, 11:52am
11
I am doing to lose my mind!!!
this is my Android Studio version v 3.0
Sujan12
October 28, 2017, 11:56am
12
The error you just posted is the exact one from the first link I posted. Read the topic, there are multiple solutions for that one.
And Android Studio 3 is not yet supported by Cordova, you should stay with 2.3.3 for now.
1 Like
Sujan12
October 28, 2017, 12:31pm
13
What exactly fixed it for you?
Nouf
October 28, 2017, 12:46pm
14
Sujan12:
2.3.3
I did not fixed it yet I am trying to find Android Studio 2.3.3
caue the the error "JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
Error: spawn EACCES
[ERROR] An error occurred while running cordova run android (exit code 1)."
is now showing again
I fixed it by running build with verbose to get the exact route of the gradle file causing the error
Then doing chmod 755 on that route
Nouf
October 30, 2017, 3:51pm
16
that did not work for me
l try to change the permissions of sdk file
drwxr-xr-x 12 staff 408 Aug 2 13:18 sdk
and I get this error if I try to change the permissions for Home
/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home: Operation not permitted
Also check this link https://forums.adobe.com/thread/2462835
Suddenly I could not build my app (which I was able to do so). I found this link and it solved my issue.
I fixed it updating this file/line:
cordova.system.library.2=com.android.support:support-v4:27.1.0
instead of:
cordova.system.library.2=com.android.support:support-v4:+
1 Like
where is this line?
I just started getting this build error as well
I update this file: project.properties into YOURPROJECT\platforms\android\
This worked for me for the same error!!
1 Like
Try removing the googleplus plugin and re-adding it