小编Sri*_*h S的帖子

如何修复 Android Studio 中的“未指定命名空间”错误?

在此输入图像描述

Namespace not specified. Please specify a namespace in the module's build.gradle file like so:

android {
namespace 'com.example.namespace'
}

If the package attribute is specified in the source AndroidManifest.xml, it can be migrated automatically to the namespace value in the build.gradle file using the AGP Upgrade Assistant; please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information.
Run Code Online (Sandbox Code Playgroud)

升级到 Android Studio Flamingo 并提供 AGP Upgrade Assistant 从 7.4.2 到 8.0.0 后,我收到此错误。

这是一个 ionic 项目,因此命名空间已经在 build.gradle 文件中指定,如下所示,

构建.gradle

apply plugin: 'com.android.application'

android {

    namespace 'com.example.m' …
Run Code Online (Sandbox Code Playgroud)

android android-studio ionic-framework

66
推荐指数
3
解决办法
7万
查看次数

标签 统计

android ×1

android-studio ×1

ionic-framework ×1