I'm trying to start my first Android Studio app and coming across
the same error over and over when I try to run or debug. I'm building
a music app using the Spotify API and have imported the zipped jar
files in the correct directory (under libs in my app).
What seems to be the problem is that maybe my SDK folder is in
another drive? I don't think so, but it was the only thing I can think
it would be. I even moved over my Android Studio folder and tried
running it from the same D: drive but didn't make any difference.
This is the error I am getting:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to
run command:
D:adt-bundle-windows-x86_64-20140702(2)adt-bundle-windows-x86_64-20140702sdkuild-tools19.1.0dx.bat
--dex --output
C:UsersJesseAndroidStudioProjectsSubRosaappuildintermediatesdexdebug
C:UsersJesseAndroidStudioProjectsSubRosaappuildintermediatesclassesdebug
C:UsersJesseAndroidStudioProjectsSubRosaappuildintermediatesdependency-cachedebug
C:UsersJesseAndroidStudioProjectsSubRosaappuildintermediatesexploded-aarcom.spotify.sdkspotifysdk1.0.0-beta5libsjnihelpers-1.0.jar
D:adt-bundle-windows-x86_64-20140702(2)adt-bundle-windows-x86_64-20140702sdkextrasandroidm2repositorycomandroidsupportsupport-v419.0.1support-v4-19.0.1.jar
C:UsersJesseAndroidStudioProjectsSubRosaappuildintermediatesexploded-aarcom.spotify.sdkspotifysdk1.0.0-beta5classes.jar
C:UsersJesseAndroidStudioProjectsSubRosaappuildintermediatesexploded-aarcom.android.supportappcompat-v719.0.1classes.jar
Error Code:
1
Output:
'D:adt-bundle-windows-x86_64-20140702' is not recognized as an
internal or external command,
operable program or batch file.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info
or --debug option to get more log output.
Here is some my code and gradle builds/props:
local.properties
sdk.dir=D:\adt-bundle-windows-x86_64-20140702(2)\adt-bundle-windows-x86_64-20140702\sdk
build.gradle(app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion '19.1.0' // Note: this version should match the
latest build-tools version
// that you installed in the SDK manager
defaultConfig {
applicationId "com.jesse.spalding.subrosa"
minSdkVersion 14
targetSdkVersion 19
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles
getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
dexOptions {
preDexLibraries = false
}
}
repositories {
mavenCentral()
flatDir {
dirs 'libs'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.spotify.sdk:spotifysdk:1.0.0-beta5@aar'
compile 'com.android.support:appcompat-v7:19.0.1'
}
If anyone has any idea what the deal is what this, please let me
know. I need to start working on this for a final project and just
can't figure this technical thing out for some reason! Thanks in
advance.
|