简体   繁体   English

android studio 中的未知错误。(资源)

[英]Unknown error in android studio.(resources)

I have been working on an app recently.我最近一直在开发一个应用程序。 It worked fine on the first but after some time the build started to fail with mentioning this in the log它在第一个上运行良好,但一段时间后构建开始失败,并在日志中提到这一点

AAPT: error: failed writing to 'C:\Users\Dr.Nickson\Desktop\GitHub\FutureFurnitureUI-Android\app\build\intermediates\runtime_symbol_list\debug\R.txt': The data is invalid. (13).

As i think it should be an error in the resources but I don't know or I might be wrong.因为我认为这应该是资源中的错误,但我不知道或者我可能是错的。 The red squigly lines are shown under the "app" directory.红色波浪线显示在“app”目录下。

I also looked up for the R.txt.data is inavlid(13) solution and updated plugins and gradle version and i think it became worse.我还查找了 R.txt.data is inavlid(13) 解决方案和更新的插件和 gradle 版本,我认为它变得更糟。 Heres my build.gradle file这是我的 build.gradle 文件

apply plugin: 'com.android.application'


android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.shashank.platform.furnitureecommerceappui"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        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:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'de.hdodenhof:circleimageview:3.0.0'
    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'


}

Here is the gradle-wrapper.properties file这是 gradle-wrapper.properties 文件

#Mon Nov 09 06:54:21 IST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip

The only help the IDE gives is the squigly red lines under the app directory as I see it. IDE 提供的唯一帮助是我看到的 app 目录下的波浪形红线。 Any help would be really appreciated as I've been stuck in this for 2 weeks.任何帮助将不胜感激,因为我已经坚持了 2 周。

I had the same problem, turns out my avg antivirus was blocking the build of the app for some reason.我遇到了同样的问题,结果我的平均防病毒软件由于某种原因阻止了应用程序的构建。 Check your antivirus and give the permission to allow the build of the app.检查您的防病毒软件并授予允许构建应用程序的权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM