我好几天都有错误:
Error:Execution failed for task ':nameproject_library:processReleaseManifest'.
格式说明符'20g'
我有一个projet应用程序和一个库,我在stackoverflow和google中搜索了很多但是所有解决方案对我都不起作用
build.gradle library:
build.gradle mylibrary:
apply plugin: 'com.android.library'
repositories {
mavenCentral()
jcenter()
maven { url 'http://xxxxxx:8081/nexus/content/groups/public/' }
//maven { url "http://repo1.maven.org/maven2" }
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
}
}
apply plugin: 'android-apt'
def AAVersion = '3.1'
apt {
arguments {
androidManifestFile variant.outputs[0].processResources.manifestFile
}
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/license.txt'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
apt "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"
compile 'com.google.code.gson:gson:2.3'
compile(
[group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '1.9.9'],
[group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.1.1'],
[group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.1.2']
)
compile 'org.codehaus.jackson:jackson-core-asl:1.1.0'
compile 'com.j256.ormlite:ormlite-core:4.48'
compile 'com.j256.ormlite:ormlite-android:4.48'
compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.13'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp:2.7.0'
compile 'org.springframework.android:spring-android-rest-
template:1.0.1.RELEASE'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.android.support:multidex:1.0.0'
compile('org.springframework.security:spring-security-
crypto:3.1.4.RELEASE') {
exclude group: 'org.springframework', module: 'spring-core'
}
//Dependency for Twitter
compile files('libs/signpost-commonshttp4-1.2.1.1.jar')
compile files('libs/signpost-core-1.2.1.1.jar')
compile files('libs/twitter4j-core-4.0.2.jar')
compile files('libs/twitter4j-media-support-3.0.3.jar')
//Dependency for Facebook
//compile 'com.facebook.android:facebook-android-sdk:4.3.0'
// Dependency for Google Sign-In
compile 'com.google.android.gms:play-services-auth:8.4.0'
// Dependency for Location
//compile 'com.google.android.gms:play-services-location:8.4.0'
}
//google plus
apply plugin: 'com.google.gms.google-services'
build.gradle app:
apply plugin: 'com.android.application'
repositories {
mavenCentral()
jcenter()
maven { url 'http://********:8081/nexus/content/groups/public/' }
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
}
}
apply plugin: 'android-apt'
def AAVersion = '3.1'
apt {
arguments {
androidManifestFile variant.outputs[0].processResources.manifestFile
}
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "fr.assuristance.presentation"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/license.txt'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
}
dependencies {
compile project(':filassistance_library')
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.0'
apt "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"
}
使用--stacktrace我得到
org.gradle.api.GradleException:无法确定任务':app:mockableAndroidJar'的依赖关系。
任何帮助将不胜感激
答案 0 :(得分:2)
我终于解决了这个问题
错误格式说明符' 20g'来自项目路径,文件夹包含" %"
之后我仍然有一个错误:错误:任务' :: processReleaseResources'执行失败。 >在索引4
而且在Android SDK中我注意到有一个破坏的sdk工具(我怀疑在我更新android studio后会破坏),所以我只是删除它们并且构建现在正常工作