首页 > 解决方案 > 如何在android studio中获取applicationid?

问题描述

我在我的 android studio 项目的 build.gradle (Module:app) 中错误地删除了我的 applicationId。我有什么办法可以重置它吗?我无法运行、调试或重建我的项目。请帮忙,我卡住了。

标签: androidandroid-studiobuild.gradle

解决方案


像这样在gradle中重写它..

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "abc.com.mobile"
        minSdkVersion 24
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

}

如果应用程序已经发布,然后转到应用程序链接,并且在 id= 之后的链接中是您的包名,因为在此链接中 ez.intandif.iniplayer 是包名。 https://play.google.com/store/apps/details?id=ez.intandif.iniplayer


推荐阅读