gpt4 book ai didi

android - Android App Project停止编译,grade.build错误

转载 作者:行者123 更新时间:2023-12-03 05:07:06 24 4
gpt4 key购买 nike

我是gradle的新手,从Android的第一步开始。

直到昨天,我才能够编译和测试我的Android App,当我单击“调试'app'”时突然停止编译并出现此错误

Android resource linking failed
C:\Users\Nicolas\AndroidStudioProjects\ATMobile\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2508: error: resource android:attr/fontVariationSettings not found.
C:\Users\Nicolas\AndroidStudioProjects\ATMobile\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2509: error: resource android:attr/ttcIndex not found.
error: failed linking references.

这是我的成绩。buil(应用程序)
apply plugin: 'com.android.application'

android {
signingConfigs {
}
compileSdkVersion 26
// buildToolsVersion "26.0.2"

defaultConfig {
applicationId "ar.com.codigose.atmobile"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0 BETA"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true

}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
//buildToolsVersion '29.0.0 rc1'
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.nbsp:library:1.8'
implementation 'android.arch.navigation:navigation-fragment:1.0.0'
}

我评论了buildToolsVersion标记,因为我在github中看到了原始文件,并且没有该行。

和这个成绩。buil(项目)
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'


// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()
maven {
url "http://dl.bintray.com/lukaville/maven"
}
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

我想继续在SDK 26中进行开发,但是看不到有什么问题。

在ide中,该行:
实现'com.android.support:appcompat-v7:26.1.0'

强调并说找到了28.0.0版本的内容,但该版本我什么也没有。

到底是怎么回事 ??
最好的祝福

最佳答案

如果您要在与原始文件不同的Android SDK版本上构建此应用,则此Udacity链接可能会有所帮助(页面的注释部分):

https://classroom.udacity.com/courses/ud839/lessons/7633778648/concepts/2eef07a4-abb3-448f-8025-8aeb7cf21621

关于android - Android App Project停止编译,grade.build错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56229738/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com