Android Gradle问题
大家好,我刚刚打开我的android studio,发现了这些问题,尝试了研究,但没有找到解决方法,请帮助我。 “android.enableApt2”选项已弃用,不应再使用。使用“android.enableApt2=true”删除此警告。将于2018年底拆除。。未能解析:ch.acra:acra:4.9.0在文件中显示在项目结构对话框中显示未能解析:com.astuetz:pagerslidingtastrip:1.0.1在项目结构对话框中显示在文件中显示未能解析:uk.co.chrisjenx:书法:2.3.0在项目结构对话框中显示在文件中显示未能解析:com.mcxiaoke.volley:library:1.0.19显示在项目结构对话框中的文件显示无法解析:com.itextpdf:itextg:5.5.9项目结构对话框中的文件显示无法解析:org.greenrobot:eventbus:3.0.0项目结构对话框中的文件显示无法解析:com.adeel:easyFTP:1.0项目结构对话框中的文件显示无法解析:cz.msebera.android:httpclient:4.4.1.2在项目结构对话框中打开文件显示无法解析:com.github.bumptech.glide:glide:glide:3.7.0在项目结构对话框中打开文件显示无法解析:com.squareup:javawriter:2.1.1在项目结构对话框中打开文件显示无法解析:javax.inject:javax.inject:javax.inject:1在项目中打开文件显示结构对话框解析失败:org.hamcrest:hamcrest库:1.3在项目结构对话框中打开文件显示解析失败:org.hamcrest:hamcrest集成:1.3在项目结构对话框中打开文件显示解析失败:com.google.code.findbugs:jsr305:2.0.1在项目结构对话框中打开文件显示解析失败:javax.annotation:javax.annotation api:1.2在项目结构对话框中打开文件显示无法解析:junit:junit:4.12在项目结构对话框中显示文件 这是我的毕业档案 //顶级生成文件,您可以在其中添加所有子项目/模块通用的配置选项Android Gradle问题,android,gradle,Android,Gradle,大家好,我刚刚打开我的android studio,发现了这些问题,尝试了研究,但没有找到解决方法,请帮助我。 “android.enableApt2”选项已弃用,不应再使用。使用“android.enableApt2=true”删除此警告。将于2018年底拆除。。未能解析:ch.acra:acra:4.9.0在文件中显示在项目结构对话框中显示未能解析:com.astuetz:pagerslidingtastrip:1.0.1在项目结构对话框中显示在文件中显示未能解析:uk.co.chrisje
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven {
url 'https://maven.google.com'
}
/*jcenter()
google()*/
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
这是应用程序级别的渐变
应用插件:“com.android.application”
android {
compileSdkVersion 26
buildToolsVersion '27.0.3'
defaultConfig {
multiDexEnabled true
applicationId "com.t4s.apl_test"
minSdkVersion 17
targetSdkVersion 26
versionCode 16
versionName "1.6.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
checkReleaseBuilds false
}
repositories {
maven { url "http://jzaccone.github.io/SlidingMenu-aar" }
maven { url "https://jitpack.io" }
}
}
configurations.all {
// Check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// Volley (HTTP library)
// Crash Reports Library (ACRA)
implementation('ch.acra:acra:4.9.0') {
exclude group: 'org.json'
}
// Volley (HTTP library)
// Volley (HTTP library)
implementation 'com.android.support:appcompat-v7:26.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:26.3.0'
//compile 'com.jeremyfeinstein.slidingmenu:library:1.3@aar'
implementation 'com.android.support:support-v4:26.3.0'
implementation 'com.android.support:cardview-v7:26.3.0'
implementation 'com.astuetz:pagerslidingtabstrip:1.0.1'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'com.google.code.gson:gson:2.7'
implementation 'com.mcxiaoke.volley:library:1.0.19'
// compile 'com.github.PhilJay:MPAndroidChart:v3.0.2'
implementation 'com.github.PhilJay:MPAndroidChart:v2.1.6'
implementation 'com.itextpdf:itextg:5.5.9'
implementation 'org.greenrobot:eventbus:3.0.0'
testImplementation 'junit:junit:4.12'
//Image Picker
implementation 'com.github.esafirm.android-image-picker:imagepicker:1.7.5'
implementation 'com.adeel:easyFTP:1.0'
implementation files('libs/simpleftp.jar')
implementation group: 'cz.msebera.android' , name: 'httpclient' , version: '4.4.1.2'
implementation 'com.android.support:multidex:1.0.3'
}
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.0'
}
}
}
}
在项目根文件夹中的gradle.properties文件中,尝试替换以下行
android.enableAapt2 = false
android.enableAapt2 = false
与
希望这有帮助。终于找到了解决办法 刚刚加了这两行
jcenter()
mavenCentral()
应用程序内等级
在格拉德尔
android.enableAapt2 = false