gradlew: Permiso Denegado


Estoy intentando ejecutar gradlew desde mi línea de comandos, pero estoy constantemente enfrentando el siguiente error.

Brendas-MacBook-Pro:appx_android brendalogy$ ./gradlew compileDebug --stacktrace
-bash: ./gradlew: Permission denied

Ya estoy ejecutando este comando desde el directorio de mi proyecto. Necesito ejecutar este comando ya que me enfrento al mismo error (no descriptivo) en Android Studio 0.2.x como se encuentra aquí: Error de compilación de Android studio y gradle

Estoy haciendo algo mal y cómo puedo evitar esto?

Author: Community, 2013-07-16

6 answers

Intenta establecer el indicador de ejecución en tu archivo gradlew:

chmod +x gradlew

 494
Author: Vincent,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-07-16 06:33:30

Jenkins > Panel del proyecto > (seleccione proyecto de gradle) Configure > Build

X Use la envoltura de Gradle

Hacer que gradlew sea ejecutable x

 20
Author: Pnemonic,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-11-23 12:52:06

Puedes usar "bash" antes del comando:

bash ./gradlew compileDebug --stacktrace
 15
Author: user3816061,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-08-10 04:24:20

También se podría arreglar con

git update-index --chmod=+x gradlew

 12
Author: user1921819,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-03-02 15:45:49

Git update-index ch chmod = + x gradlew

Este comando funciona mejor especialmente en sistemas no unix.

 7
Author: ekarankow,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-03-02 17:20:05

Si no funciona después de chmod'ing asegúrese de que no está intentando ejecutarlo dentro del directorio /tmp.

 1
Author: Quinn Carver,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-07-15 17:25:22