Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle assembleDebug and preDexDebug fail even for new project

i'm facing an error trying to compile an run my project. It even happens if I try to run a new project with just a blank activity in Android Studio.

The error occurs during the gradle 'preDexDebug' task.

Error:Execution failed for task ':app:preDexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
    /Users/myname/Dev/tools/android-sdk-macosx/build-tools/19.0.3/dx --dex --output      /Users/myname/Dev/products/MyApplication2/app/build/pre-dexed/debug/classes-fd798db4dfad23fbf10ff420c899a156c7f9dc1e.jar /Users/myname/Dev/products/MyApplication2/app/build/exploded-aar/com.android.support/appcompat-v7/19.1.0/classes.jar
  Error Code: 1

Below my project configuration (tried both, online and offline mode):

http://i.stack.imgur.com/fffQZ.png http://i.stack.imgur.com/fbGss.png

Anyone faced the same error?

UPDATE

If I manually run from the command line (project root folder)

chmod +x ./gradlew
./gradlew assembleDebug

The task runs and I'm again able to build and run the project on Android Studio

like image 716
Pierdani Avatar asked Nov 01 '22 00:11

Pierdani


1 Answers

Looks like you got it to work, but just in case others have the issue and end up on this page like me - I was unable to kick start Android Studio into building again until I did a complete restart of the app.

I'm on Android Studio beta 0.8.1 on OSX mavericks.

like image 88
paulb Avatar answered Nov 09 '22 09:11

paulb