2016-08-04 70 views
20

我ionic2得到錯誤:產卵EACCES而在Ubuntu的離子構建Android 14.04

開發一個項目,而我在做離子構建Android我收到此錯誤

enter image description here

我離子信息是

科爾多瓦CLI:6.3.0

離子Framework版本:2.0.0-beta.10

離子CLI版本:2.0.0-beta.36

離子應用庫版本:2.0.0-beta.19

OS:分銷商ID:Ubuntu的描述:Ubuntu的14.04.5 LTS

節點版本:v4.4.7

我在谷歌搜索,但沒有解決方案適用於我..

我怎麼能修復這個bug?

+0

我認爲它是因爲你的路徑 –

回答

22

打這個命令

sudo chmod -R a+rwx /appfolder 

它是由權限問題引起的。有關問題的更多信息here

If this does not solve your problem then its probably issue of permission in your user profile directory. Try above command on user directory. It will take some time to apply permission.

問候。

+0

它不適合我 – ramya

+0

它是否給出任何錯誤?你提到這個:http://stackoverflow.com/a/32314465/6449750 –

+0

不..這個命令工作正常..但無法修復該錯誤。 – ramya

3

有同樣的問題,我把它固定通過我的SDK文件夾賦予777個權限: 搭配chmod -R 777/YOURINSTALLOFANDROID/SDK

+0

https://en.wikipedia.org/wiki/Principle_of_least_privilege – EJoshuaS

46

這是允許誤差範圍,同時建立應用

你需要給權限搖籃

須藤搭配chmod -R 777 /應用/ Android的\工作室\ 3.0 \ Preview.app/Contents/gradle

享受:)

+0

感謝它解決了這個問題。 – Biranchi

+0

我的快樂謝謝:) –

+0

解決了我的問題!謝謝 – Fernando

6

使用冗長的,當你讓你的科爾多瓦編譯:

cordova build -verbose 

會返回到你需要的chmod +x

6

我用科爾多瓦到我的Android設備上運行我的混合應用程序的路徑,我不成功的構建過程中得到這個錯誤的兩倍......

錯誤:產卵EACCES

@Krunel Vaghela的回答上面幫我有點...

This is Permission Error While Building App

You Need to Give Permission Gradle

sudo chmod -R 777 /Applications/Android\ Studio\ 3.0\ Preview.app/Contents/gradle

但我一直有這個錯誤: 「文件模式:-r:沒有這樣的文件或目錄」

我使用這個命令:

[Sandis-Macbook-Pro:Users sandi$ sudo chmod -R 777 /Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle 

請注意,我的Android應用程序是命名爲「Android Studio.app」(名稱中有一個空格)。解決方案是簡單地包裹路徑引號,像這樣:

[Sandis-Macbook-Pro:Users sandi$ sudo chmod -R 777 "/Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle" 

注:爲了找出哪些文件夾是有這個權限的問題,我不得不使用這個命令:

sudo build -verbose 

其產生該路徑權限問題的文件夾是這樣的:

ANDROID_HOME=/Users/sandi/Library/Android/sdk 
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home 
Running command: "/Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle" -p /Users/sandi/Desktop/CORDOVA_NOV16/HHUB_NOV17/hhub_CURRENT/platforms/android wrapper -b /Users/sandi/Desktop/CORDOVA_NOV16/HHUB_NOV17/hhub_CURRENT/platforms/android/wrapper.gradle 
Error: spawn EACCES 

所以採取的路徑後,「運行命令:」 - 把那個,引號內,後...

chmod -r 777 

這就是拯救了我的一天。

+0

謝謝。你解釋了一切。雖然 - 動搖沒有奏效。但我最終要建立我的離子項目。非常感謝! –