Error Android Studio Execution Failed


I Am Having a problem with android studio that i cant figure out
how to fix so please help.



When i build my app it gives me an error : Execution failed for
task ':app:dexDebug'
but when i make a new project it works fine



Log:



 Error:Execution failed for task ':app:dexDebug'.



com.android.ide.common.internal.LoggedErrorException: Failed to
run command:
C:UsersRay ChamounAppDataLocalAndroidsdkuild-tools21.1.2dx.bat
--dex --no-optimize --output
F:FilesWorkspaceMIMPappuildintermediatesdexdebug
--input-list=F:FilesWorkspaceMIMPappuildintermediates mpdexdebuginputList.txt
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define
Landroid/support/annotation/AnimRes;
at
com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
at
com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
at
com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
at
com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at
com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
at
com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)




So any help would be great and sorry for bad English.

I want to compile a project, I got Error:Gradle: Execution
failed for task ':app:processDebugResources'.



here is the exception:




Error:Gradle: Execution failed for task
':app:processDebugResources'.
com.android.ide.common.internal.LoggedErrorException: Failed to run
command:



D:devtoolsadtsdkuild-tools21.1.1aapt.exe package -f --no-crunch
-I D:devtoolsadtsdkplatformsandroid-21android.jar -M
E:codeandroidTVMediaPlayerappuildmanifestsdebugAndroidManifest.xml -S
E:codeandroidTVMediaPlayerappuild
esalldebug -A
E:codeandroidTVMediaPlayerappuildassetsdebug -m -J
E:codeandroidTVMediaPlayerappuildsource
debug -F
E:codeandroidTVMediaPlayerappuildlibsapp-debug.ap_ --debug-mode
--custom-package com.skyworth.tvmediaplayer.app --output-text-symbols
E:codeandroidTVMediaPlayerappuildsymbolsdebug



Error Code:
1



Output:

E:codeandroidTVMediaPlayerappuild
esalldebugdrawable-hdpi-v4ic_launcher.png:
error: Duplicate file.

E:codeandroidTVMediaPlayerappuild
esalldebugdrawable-hdpiic_launcher.png:
Original is here. The version qualifier may be implied.




here is the gradle file:



    android {
compileSdkVersion 21
buildToolsVersion "21.0.2"

defaultConfig {
applicationId "com.jerrellmardis.amphitheatre"
minSdkVersion 21
targetSdkVersion 21
versionCode 1
versionName "1.0"
renderscriptTargetApi 19

buildConfigField "String", "TMDB_API_KEY",
""${loadSecret("TMDB_API_KEY")}""
}
......
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:recyclerview-v7:21.0.0'
compile 'com.android.support:leanback-v17:21.0.0'
compile 'com.android.support:appcompat-v7:21.0.0'
compile 'com.android.support:palette-v7:21.0.0'
compile 'com.squareup.picasso:picasso:2.3.4'
compile 'com.squareup.retrofit:retrofit:1.7.1'
compile 'com.google.code.gson:gson:2.3'
compile 'org.apache.commons:commons-lang3:3.3.2'
compile 'org.apache.commons:commons-collections4:4.0'
compile 'com.jakewharton:butterknife:6.0.0'
compile 'com.github.satyan:sugar:1.3'
}


I am puzzled about the error message, am I put the wrong png file
or my gradle config file is wrong?

Web Development

I updated my Android Studio to 1.0.1. I followed this tutorial href="http://tools.android.com/tech-docs/new-build-system/migrating-to-1-0-0"
rel="nofollow">http://tools.android.com/tech-docs/new-build-system/migrating-to-1-0-0
and changed from runProguard to minifyEnabled
true
. I also changed it in my library project. When I tried to
compile it gave me Error:Execution failed for task ':>
java.io.FileNotFoundException: ProjectNamelibraryproguard-rules.txt
(The system cannot find the file specified)
. I researched for
that and I found a solution. I added blank
proguard-rules.txt file into that folder. After trying to
compile, it gave me even more errors. The main error now was that it
cannot find symbol class PageIndicator, which is my
library's class. I don't even know what can I do for that.



My project's build.gradle:



apply plugin: 'android'

android {
compileSdkVersion 21
buildToolsVersion "20.0.0"

defaultConfig {
applicationId "com.miesto.meniu"
minSdkVersion 9
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles
getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}


dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':library')
compile files('libs/volley.jar')
compile 'com.google.android.gms:play-services:6.1.71'
compile 'com.android.support:appcompat-v7:21.0.0'
compile 'com.android.support:support-v4:21.0.0'
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.0@aar'
compile('com.google.api-client:google-api-client-xml:1.17.0-rc') {
exclude group: 'com.google.android.google-play-services'
}
compile 'com.google.http-client:google-http-client-gson:1.17.0-rc'

compile('com.google.api-client:google-api-client-android:1.17.0-rc') {
exclude group: 'com.google.android.google-play-services'
}
compile
'com.google.apis:google-api-services-drive:v2-rev105-1.17.0-rc'
compile files('libs/YouTubeAndroidPlayerApi.jar')
}


My library's build.gradle:



apply plugin: 'com.android.library'

android {
compileSdkVersion 21
buildToolsVersion "20.0.0"

defaultConfig {
minSdkVersion 9
targetSdkVersion 19
}

buildTypes {
release {
minifyEnabled true
proguardFiles
getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}

dependencies {
compile 'com.android.support:support-v4:21.0.0'
}


What am I doing wrong?

Web Development

Information:Gradle tasks [:assembleDebug]
:preBuild
:compileDebugNdk
:preDebugBuild
:checkDebugManifest
:preReleaseBuild
:facebook:compileLint
:facebook:copyReleaseLint UP-TO-DATE
:facebook:preBuild
:facebook:preReleaseBuild
:facebook:checkReleaseManifest
:facebook:preDebugBuild
:facebook:preDebugTestBuild
:facebook:prepareComAndroidSupportSupportV42103Library UP-TO-DATE
:facebook:prepareReleaseDependencies
:facebook:compileReleaseAidl UP-TO-DATE
:facebook:compileReleaseRenderscript UP-TO-DATE
:facebook:generateReleaseBuildConfig UP-TO-DATE
:facebook:generateReleaseAssets UP-TO-DATE
:facebook:mergeReleaseAssets UP-TO-DATE
:facebook:generateReleaseResValues UP-TO-DATE
:facebook:generateReleaseResources UP-TO-DATE
:facebook:mergeReleaseResources UP-TO-DATE
:facebook:processReleaseManifest UP-TO-DATE
:facebook:processReleaseResources UP-TO-DATE
:facebook:generateReleaseSources UP-TO-DATE
:facebook:compileReleaseJava UP-TO-DATE
:facebook:extractReleaseAnnotations UP-TO-DATE
:facebook:mergeReleaseProguardFiles UP-TO-DATE
:facebook:processReleaseJavaRes UP-TO-DATE
:facebook:packageReleaseJar UP-TO-DATE
:facebook:compileReleaseNdk UP-TO-DATE
:facebook:packageReleaseJniLibs UP-TO-DATE
:facebook:packageReleaseLocalJar UP-TO-DATE
:facebook:packageReleaseRenderscript UP-TO-DATE
:facebook:packageReleaseResources UP-TO-DATE
:facebook:bundleRelease UP-TO-DATE
:prepareComAndroidSupportSupportV42103Library UP-TO-DATE
:prepareComFacebookAndroidFacebook3211Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServices6587Library UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugManifest UP-TO-DATE
:processDebugResources UP-TO-DATE
:generateDebugSources UP-TO-DATE
:compileDebugJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:preDexDebug
:dexDebug
UNEXPECTED TOP-LEVEL EXCEPTION:
Error:Execution failed for task ':dexDebug'.




com.android.ide.common.internal.LoggedErrorException: Failed to
run command:

/home/manu-005/Android_Setups/adt-bundle-linux-x86_64-20140702/sdk/build-tools/android-4.4W/dx
--dex --no-optimize --output
/home/manu-005/workspace/AppName/build/intermediates/dex/debug
/home/manu-005/workspace/AppName/build/intermediates/classes/debug
/home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/support-annotations-21.0.3-49ca8e8cfc94918d7386df6065be15226206f457.jar
/home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/bolts-android-1.1.4-61545c8defb142f83369be67bcebfa1f7690985c.jar
/home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/MobileAppTracker-3.3.3-ca9457cd9ec6680ec9d845d2fc19efec4582c397.jar
/home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/internal_impl-21.0.3-e77489df911cb5896aab6b91a4d4b9a838794c56.jar
/home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/crittercism_v5_0_3_sdkonly-e644ef988027d1838362de88be35bbf0b876caf6.jar
/home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/MobileAppTracker-javadoc-3.3.3-1641c6311e6f070ecd4d1320f44b1ba50b75dd0c.jar
/home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/classes-001b548439aeb2e89d0d4f68cd7c4e4e33d1588c.jar
/home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/android-support-v4-cc1887d592a4c530b10eb1125f7e630a900240bc.jar
/home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/classes-34d67503c62f0f63b1f57f2f61a56c8d3b95a06e.jar
/home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/classes-f79c881d5c91c7786b3cf2ab1a07ece9788351e8.jar
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define
Landroid/support/annotation/AnimRes;
at
com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:594)
at
com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:552)
at
com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:533)
at
com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
at
com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
at
com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
at com.android.dx.command.dexer.Main.run(Main.java:230)
at com.android.dx.command.dexer.Main.main(Main.java:199)
at com.android.dx.command.Main.main(Main.java:103)
Information:BUILD FAILED
Information:Total time: 3 mins 39.856 secs
Information:1 error
Information:0 warnings
Information:See complete output in console


Web Development

I Am Having a problem with android studio that i cant figure out
how to fix so please help.



When i build my app it gives me an error : Execution failed for
task ':app:dexDebug'
but when i make a new project it works fine



Log:



 Error:Execution failed for task ':app:dexDebug'.



com.android.ide.common.internal.LoggedErrorException: Failed to
run command:
C:UsersRay ChamounAppDataLocalAndroidsdkuild-tools21.1.2dx.bat
--dex --no-optimize --output
F:FilesWorkspaceMIMPappuildintermediatesdexdebug
--input-list=F:FilesWorkspaceMIMPappuildintermediates mpdexdebuginputList.txt
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define
Landroid/support/annotation/AnimRes;
at
com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
at
com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
at
com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
at
com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at
com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
at
com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)




So any help would be great and sorry for bad English.

Web Development

I have imported my application from android studio 0.8 to 1.0. But
when i am running the application i am getting the error message



Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to
run command:
/home/anand/SLABS_SOFT/android-studio/sdk/build-tools/21.1.2/dx
--dex --no-optimize --output
/home/anand/AndroidStudioProjects/smartcity-android/app/build/intermediates/dex/debug
--input-list=/home/anand/AndroidStudioProjects/smartcity-android/app/build/intermediates/tmp/dex/debug/inputList.txt
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexIndexOverflowException: method ID not in [0,
0xffff]: 65536
at
com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:502)
at
com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:277)
at
com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:491)
at
com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:168)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at
com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)


I am not able to figure out why this error is arising.



The build.gradle for my application is:



apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
applicationId "com.mobile.android"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
packagingOptions {
// Exclude file to avoid
// Error: Duplicate files during packaging of APK
exclude
'META-INF/services/javax.annotation.processing.Processor'
}
buildTypes {
release {
minifyEnabled false
proguardFiles
getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'

compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/com.google.android.maps.jar')
compile 'com.google.android.gms:play-services:6.5.87'

compile
'com.nostra13.universalimageloader:universal-image-loader:1.8.5'
compile 'com.google.android.gms:play-services:6.5.87'
compile 'com.jakewharton:butterknife:5.1.1'

compile 'com.squareup.dagger:dagger:1.0.1'
compile 'com.squareup.dagger:dagger-compiler:1.0.1'
compile 'com.squareup.retrofit:retrofit:1.5.1'
compile 'com.squareup:otto:1.3.4'

compile
'com.google.api-client:google-api-client-android:1.17.0-rc'
compile 'com.google.http-client:google-http-client-gson:1.17.0-rc'


compile('com.github.androidsocialnetworks:library:0.3.7@aar') {
transitive = true
}
// compile 'com.squareup.okhttp:okhttp:2.0.0@jar'
// Image Slider Library
compile 'com.daimajia.slider:library:1.1.2@aar'
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.nineoldandroids:library:2.4.0'

}
Web Development

I tried to run a colleague's program in Android Studio, but I got
this error:



Error:Execution failed for task ':app:compileDebugNdk'.
> com.android.ide.common.internal.LoggedErrorException: Failed to
run command:
C:UsersDigital StormDownloadsandroid-ndk-r10d
dk-build.cmd NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:UsersDigital
StormOzcanLabimager-app.gitappuildintermediates
dkdebugAndroid.mk APP_PLATFORM=android-19 NDK_OUT=C:UsersDigital
StormOzcanLabimager-app.gitappuildintermediates
dkdebugobj NDK_LIBS_OUT=C:UsersDigital
StormOzcanLabimager-app.gitappuildintermediates
dkdebuglib APP_ABI=all
Error Code:
1


Can you give any hints, where I would have to start searching for
debugging this?

Web Development

- Technology - Languages
+ Webmasters
+ Development
+ Development Tools
+ Internet
+ Mobile Programming
+ Linux
+ Unix
+ Apple
+ Ubuntu
+ Mobile & Tablets
+ Databases
+ Android
+ Network & Servers
+ Operating Systems
+ Coding
+ Design Software
+ Web Development
+ Game Development
+ Access
+ Excel
+ Web Design
+ Web Hosting
+ Web Site Reviews
+ Domain Name
+ Information Security
+ Software
+ Computers
+ Electronics
+ Hardware
+ Windows
+ PHP
+ ASP/ASP.Net
+ C/C++/C#
+ VB/VB.Net
+ JAVA
+ Javascript
+ Programming
Privacy Policy - Copyrights Notice - Feedback - Report Violation 2018 © BigHow