所以每次尝试在Android Studio上同步我的项目
时,我都会遇到此错误错误
process'命令'c: users applistrator appdata local android android sdk build-tools 25.0.2 aapt.exe'
这是我的 build.grable 文件
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.newcoderplus.moneymachinecash"
minSdkVersion 16
targetSdkVersion 25
versionCode 2
versionName "2.0"
multiDexEnabled = true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "2g"
}
packagingOptions {
exclude 'META-INF/ASL2.0'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/MANIFEST.MF'
}
}
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
maven { url 'http://dl.bintray.com/amulyakhare/maven' }
maven { url "https://bitbucket.org/adscend/androidsdk/raw/master/" }
maven { url "https://dl.bintray.com/ironsource-mobile/android-sdk" }
maven { url "http://dl.bintray.com/ironsource-mobile/android-adapters" }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile project(':fragmentation_swipeback')
compile files('libs/AdxmiSdk_v6.0.0_2016-10-21.jar')
compile files('libs/NativeXMonetizationSDK_v5.5.9.jar')
compile files('libs/gson-2.3.1.jar')
compile files('libs/applovin-sdk-7.0.3.jar')
compile files('libs/SuperRewards-3.1b.jar')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:multidex:1.0.1'
compile 'com.jakewharton:butterknife:8.5.1'
compile 'com.github.GrenderG:Toasty:1.1.3'
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
compile 'com.afollestad.material-dialogs:core:0.9.4.1'
compile 'com.jude:easyrecyclerview:4.4.0'
compile 'com.jude:rollviewpager:1.4.6'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'jp.wasabeef:glide-transformations:2.0.2'
compile 'me.yokeyword:fragmentation:0.10.4'
compile 'com.github.medyo:android-about-page:1.2'
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
compile group: 'com.backendless', name: 'backendless', version: '4.0.0-beta3'
compile 'com.google.android.gms:play-services-ads:10.2.1'
compile 'com.google.android.gms:play-services-base:10.2.1'
compile 'com.google.android.gms:play-services-location:10.2.1'
compile 'com.adcolony:sdk:3.1.2'
compile 'com.ironsource.adapters:admobadapter:3.0.2@jar'
compile 'com.ironsource.sdk:mediationsdk:6.5.3@jar'
compile project(':fragmentation_swipeback')
compile files('libs/AdxmiSdk_v6.0.0_2016-10-21.jar')
compile files('libs/NativeXMonetizationSDK_v5.5.9.jar')
compile files('libs/gson-2.3.1.jar')
compile files('libs/applovin-sdk-7.0.3.jar')
compile files('libs/SuperRewards-3.1b.jar')
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.3.1'
}
}
}
}
apply plugin: 'com.google.gms.google-services'
我到目前为止拥有Android Studio的最后版本
某些东西与我的Android Studio无法使用。我正在使用最新版本的Android Studio,但它仍然在Gradle Build上给我带来了错误。关于我如何解决此问题的任何想法?
我昨天遇到了这个问题。不知道该怎么办。所以Google IT 。但是,我遇到的任何材料都没有对prob 的确切解决方案,似乎对不同的人有所作为。
这是我的观察结果可以节省您的时间。 1.请验证,如果您在任何地方都用字符串,尺寸,颜色或布局XML文件中的资源。
By mistake I created some prob. with my strings xml file along with layout file.
即使是干净的构建也无法正常工作,在 每个重建/清洁。
You have to look closely, to identify the prob. with your code.
希望这会有所帮助。
首先尝试从构建菜单清洁和重建项目。
步骤1:转到构建 ->清洁项目
步骤2:转到构建 ->重建项目
这应该解决您的问题。
否则尝试从SDK Manager >尝试更新Android SDK构建工具,然后修改您的build.gradle以使用最新的buildToolSversion即,即" 27.0.3",截至现在