我尝试在我的项目中使用矢量drawables。虽然我使用了multidex和相关选项,但它无法正确构建项目,并且"完成了非零退出值2" 错误。我在每个主题中都会查找此错误,但任何解决方案对我都有用。这是我的build.gradle
摘要:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "droxoft.armin.com.shappy"
multiDexEnabled true
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
generatedDensities = []
}
aaptOptions{
additionalParameters "--no--version--vectors"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:support-vector-drawable:23.2.0'
compile 'com.android.support:design:23.2.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.google.android.gms:play-services-location:7.5.0'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.felipecsl.quickreturn:library:1.5.1'
compile 'com.android.support:multidex:1.0.1'
}
我怎样才能克服它?我只想使用矢量drawables。
Gradle控制台:
Configuration on demand is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2320Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72320Library UP-TO-DATE
:app:prepareComAndroidSupportCardviewV72320Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2320Library UP-TO-DATE
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72320Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42320Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2320Library UP-TO-DATE
:app:prepareComAstuetzPagerslidingtabstrip101Library UP-TO-DATE
:app:prepareComFacebookAndroidFacebookAndroidSdk4101Library UP-TO-DATE
:app:prepareComFelipecslQuickreturnLibrary151Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesLocation750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMaps750Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources
:app:mergeDebugResources
AAPT err(Facade for 2113227392): C:\Users\BadLer\yeniworkspace\Shappy\app\src\main\res\drawable\ballon_progress.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Bad\Programlama\AndroidStudioSDK\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 2
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 18.272 secs