Unsupported method: BaseConfig.getApplicationIdSuffix() 的用途

huangapple go评论76阅读模式
英文:

Usefulness of Unsupported method: BaseConfig.getApplicationIdSuffix()

问题

Gradle的版本为1.3.0,因此我收到错误消息“Unsupported method: BaseConfig.getApplicationIdSuffix ()”。我知道如何解决这个错误,但我不知道它是什么,如果不解决这个错误会有什么影响?

关于项目中“Android”视图的组织,如果我不解决错误,它显示不正确,但当我解决错误时,它会被正确格式化。我希望“Android”视图能够呈现良好的形式(就像创建新项目时一样),因为当前,“Android”视图类似于“Project”视图。

当我解决“Unsupported method: BaseConfig.getApplicationIdSuffix ()”错误时,会引发许多连续的错误。这就是为什么我只想知道这个方法的作用以及它如何工作。

英文:

I am importing an old project with the latest version of Android (Android Studio 4).

Gradle is at version 1.3.0 and therefore I get the error Unsupported method: BaseConfig.getApplicationIdSuffix (). I know how to resolve this error, but I don't know what it is, what does it change if I don't resolve this error?

Regarding the organization of the "Android" view for the project, it is not displayed correctly when I do not resolve the error but it is formatted well when I resolve the error. My wish is to have the "Android" view in good shape (like when creating a new project) because currently, the "Android" view is similar to the "Project" view.

The problem when I resolve the Unsupported method: BaseConfig.getApplicationIdSuffix () error is that it causes a lot of successive errors. That's why I just want to know what this method is for and how it works.

答案1

得分: 1

在我的情况下,Android Studio 3.0.1,我通过以下两个步骤解决了该问题。步骤1:在项目级别的build.gradle中更改Gradle插件版本

buildscript {

    repositories {

        jcenter()

        mavenCentral()

        maven {

            url 'https://maven.google.com/'

            name 'Google'

        }

    }

    dependencies {

        classpath 'com.android.tools.build:gradle:3.0.1'

    }

}

步骤2:更改Gradle版本

distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
英文:

In my case, Android Studio 3.0.1, I fixed the issue with the following two steps. Step 1: Change Gradle plugin version in project-level build.gradle

buildscript {

    repositories {

        jcenter()

        mavenCentral()

        maven {

            url 'https://maven.google.com/'

            name 'Google'

        }

    }

    dependencies {

        classpath 'com.android.tools.build:gradle:3.0.1'

    }

}

Step 2: Change Gradle version

distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

huangapple
  • 本文由 发表于 2020年8月4日 18:16:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/63244761.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定