免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
android – AAPT錯誤:資源drawable / …未找到

在最近升級我的android工作室之后,我無法再構(gòu)建我的項目了.

每次執(zhí)行構(gòu)建時,我都會遇到以下錯誤:

error: resource drawable/splash_screen (aka com.whereisthemonkey.nowalism:drawable/splash_screen) not found.Message{kind=ERROR, text=error: resource drawable/splash_screen (aka com.whereisthemonkey.nowalism:drawable/splash_screen) not found., sources=[C:\Users\Lucas\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\cf575568f869a44c685b16e47de83a28\res\values\values.xml:1632:5-84], original message=, tool name=Optional.of(AAPT)}

即使文件splash_screen.xml存在于drawable文件夾下,此錯誤仍然存??在.

重建,清理項目和使緩存無效不起作用!

添加android.enableAapt2 = false行并不能解決真正的問題,因此我寧愿找到問題的根源.

以下顯示了我的gradle.build文件:

apply plugin: 'com.android.application'apply plugin: 'kotlin-android'apply plugin: 'kotlin-android-extensions'apply plugin: 'kotlin-kapt'//https://github.com/bumptech/glide/issues/1939android {    compileSdkVersion 27    buildToolsVersion "27.0.3"    defaultConfig {        applicationId "com.whereisthemonkey.nowalism"        minSdkVersion 19        targetSdkVersion 27        versionCode 1        versionName "1.0"        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"        vectorDrawables.useSupportLibrary = true    }    // Keep the following configuration in order to target Java 8.    compileOptions {        sourceCompatibility JavaVersion.VERSION_1_8        targetCompatibility JavaVersion.VERSION_1_8    }    buildTypes {        release {            minifyEnabled false            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'        }    }    sourceSets {        main {            res.srcDirs  = [                    'src/main/res-backgrounds',                    'src/main/res-jobs',            ]        }    }}dependencies {    implementation fileTree(dir: 'libs', include: ['*.jar'])    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"    implementation 'com.android.support:appcompat-v7:27.1.1'    implementation 'com.android.support:cardview-v7:27.1.1'    implementation 'com.android.support:recyclerview-v7:27.1.1'    implementation 'com.android.support:design:27.1.1'    implementation 'com.android.support.constraint:constraint-layout:1.1.0'    //Do not update due to dex error    implementation 'org.apache.commons:commons-lang3:3.6'    //Do not update due to dex error    implementation 'com.google.firebase:firebase-auth:11.8.0'    implementation 'com.google.firebase:firebase-messaging:11.8.0'    implementation 'com.google.android.gms:play-services:11.8.0'    implementation 'com.aurelhubert:ahbottomnavigation:2.1.0'    implementation 'com.afollestad.material-dialogs:core:0.9.6.0'    implementation 'com.afollestad.material-dialogs:commons:0.9.6.0'    implementation 'com.amitshekhar.android:android-networking:1.0.1'    implementation 'org.apache.directory.studio:org.apache.commons.io:2.4'    implementation 'com.github.ome450901:SimpleRatingBar:1.4.1'    implementation 'com.sothree.slidinguppanel:library:3.4.0'    implementation 'com.github.esafirm.android-image-picker:imagepicker:1.12.0'    //Do not update due to dex error    implementation 'com.theartofdev.edmodo:android-image-cropper:2.5.1'    implementation 'com.github.bumptech.glide:glide:4.6.1'    kapt 'com.github.bumptech.glide:compiler:4.6.1'//https://github.com/bumptech/glide/issues/1939    implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'    implementation 'de.hdodenhof:circleimageview:2.2.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.firebaseui:firebase-ui-auth:3.2.1'    implementation 'com.android.support:support-v4:27.1.1'}apply plugin: 'com.google.gms.google-services'

任何幫助都非常感謝.

解決方法:

在我的例子中,它是一個xml選擇器.在第一行我有兩個(感謝我的文件中的復(fù)制粘貼):

<?xml version="1.0" encoding="utf-8"?>

并且Android Studio沒有發(fā)出任何警告或其他內(nèi)容.刪除它解決了問題,但之后需要完全清理構(gòu)建.

來源:https://www.icode9.com/content-4-481101.html
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊舉報
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
Android P 開發(fā)者預(yù)覽版首發(fā)!
淺談Android Studio3.0更新之路(遇坑必入)
Java之外的選擇,谷歌宣布Kotlin成為安卓官方開發(fā)語言
Android執(zhí)行文件apk的組成結(jié)構(gòu)
App瘦身最佳實踐(下)
Android SVG矢量資源的使用方法
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服