小编San*_*zzi的帖子

迁移到AndroidX

好吧,我开始从一个有多年历史的项目迁移到AndroidX(此后从此一直未动),但我在资源和gradle构建方面遇到了问题。我完全被新的名称空间迷住了,我更改了一些名称空间,升级了AndroidStudio告诉我的所有内容,但仍然无法识别项目中的内容。我将两个gradle都粘贴到这里,然后将错误放在下面。

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {

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


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

allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
}

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

模组

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion "28.0.3"
    defaultConfig {
        applicationId "com.example.usuario.tm"
        minSdkVersion 15
        targetSdkVersion …
Run Code Online (Sandbox Code Playgroud)

resources android gradle

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

android ×1

gradle ×1

resources ×1