gpt4 book ai didi

调试到设备时 Android 资源编译失败

转载 作者:行者123 更新时间:2023-11-29 00:53:25 24 4
gpt4 key购买 nike

当我将我的代码调试到设备时,我遇到了一些问题。错误显示如下:

Android resource compilation failed
/Users/agungnugroho/Downloads/AndroidStudioProjects/Version 3.0/hris/
app/build/intermediates/incremental/mergeDebugResources/merged.dir/
values/values.xml:4: error: unknown tag <:string>.
/Users/agungnugroho/Downloads/AndroidStudioProjects/Version 3.0/
hris/app/build/intermediates/incremental/mergeDebugResources/
merged.dir/values/values.xml:5: error: unknown tag <:string>.
/Users/agungnugroho/Downloads/AndroidStudioProjects/Version 3.0/
hris/app/build/intermediates/incremental/mergeDebugResources/
merged.dir/values/values.xml: error: file failed to compile.

当我添加库并在此处添加我的 build.gradle 代码时会发生这种情况:

android {
compileSdkVersion 26
defaultConfig {
applicationId "id.co.poslogistics.hris"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation "com.android.support:support-compat:26.0.0"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.mcxiaoke.volley:library:1.0.19'
implementation 'com.squareup.picasso:picasso:2.4.0'
implementation 'com.github.bumptech.glide:volley-integration:1.4.0'
implementation 'io.jsonwebtoken:jjwt:0.6.0'
implementation 'com.koushikdutta.ion:ion:2.1.7'
implementation 'com.google.android:flexbox:0.2.5'
implementation 'com.github.bumptech.glide:glide:3.5.2'
implementation 'com.jakewharton:butterknife:8.5.1'
implementation 'com.android.support:design:26.0.0'
implementation 'com.github.gcacace:signature-pad:1.2.1'
implementation 'org.apache.httpcomponents:httpcore:4.4.9'
implementation 'com.google.android.gms:play-services-location:9.6.1'
implementation 'com.google.android.play:core:1.6.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
}

谁能帮帮我,因为我不明白那个错误是什么?

最佳答案

您的 values.xml 中的标签文件应以 <string> 开头, 不是 <:string> .

关于调试到设备时 Android 资源编译失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57301059/

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