您需要使用不同的包名称,因为"com.example"受到限制

Bla*_*hog 1 domain-name google-play android-studio

我已经在这里找到了很多关于这个问题的主题,但是没有一个能为我工作.

我使用的是Android Studio 2.1.2,我仍然拥有com.example域名.在清单或任何其他文件中更改它会导致出现错误分数,并且我的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
}
Run Code Online (Sandbox Code Playgroud)

有人可以给我一些建议,因为我已经花了很多时间在这个应用程序上吗?提前致谢:-)

And*_*tel 7

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

打开应用程序级别build.gradle(在app文件夹内)并更改包名称applciationId

您无需在代码中的任何位置更改包名称.只需在此处更改它将生成您apk提供的包名称,而不管src文件夹中的包如何命名.