Android studio 您需要使用不同的包名称,因为;com.example“;限制

Android studio 您需要使用不同的包名称,因为;com.example“;限制,android-studio,google-play,domain-name,Android Studio,Google Play,Domain Name,我已经在这里找到了很多关于这个问题的帖子,但是没有一个适合我 我使用的是Android Studio 2.1.2,我仍然拥有com.example域名。在清单或任何其他文件中更改它会导致出现大量错误,my build.gradle仅显示以下内容: // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositorie

我已经在这里找到了很多关于这个问题的帖子,但是没有一个适合我

我使用的是Android Studio 2.1.2,我仍然拥有com.example域名。在清单或任何其他文件中更改它会导致出现大量错误,my build.gradle仅显示以下内容:

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

buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.1.2'

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

allprojects {
repositories {
    jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

谁能给我一些建议,因为我已经在这个应用上花了很多时间了?提前感谢:-)

您在问题中展示的是顶级的
build.gradle

打开应用程序级别的
build.gradle
(在
app
文件夹中),并根据
applicationId


您不需要在代码中的任何地方更改包名。只要在这里更改它,就可以用提供的包名生成您的
apk
,而不管您在
src
文件夹中的包是如何命名的。

这正是我想要的!非常感谢你!