小编Ili*_*ias的帖子

Android Studio 重复生成的文件

Android Studio 不断创建生成的类,即使它们已经存在。

我猜这个问题与 NavigationArgs 有关,但它总是会出现一些重复错误。

现在解决我的问题的唯一方法是每次运行应用程序之前清理整个项目。

有谁知道如何解决这个问题,我怎么知道是哪个实现导致了这个错误?

摇篮项目

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.1'
        classpath 'com.google.gms:google-services:4.3.2'
        classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.2.0-beta01"
        classpath ('com.google.firebase:firebase-plugins:1.1.0') {
            exclude group: 'com.google.guava', module: 'guava-jdk5'
        }
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)

摇篮模块

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services' …
Run Code Online (Sandbox Code Playgroud)

navigation android-studio

10
推荐指数
2
解决办法
4621
查看次数

标签 统计

android-studio ×1

navigation ×1