导入module报错Namespace not specified. Please specify a namespace in the module‘s build.gradle file like

标题 导入module报错Namespace not specified. Please specify a namespace in the module’s build.gradle file like so:

解决办法:打开导入的module的build:gradle

android {
    namespace 'com.example.XXX'
    compileSdk 33

    defaultConfig {
        applicationId "com.example.XXX"
        minSdk 16
        targetSdk 33
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
          。。。
        }
    }
    compileOptions {
      。。
    }
}

dependencies {
。。。
}

把 namespace 'com.example.XXX’和 applicationId "com.example.XXX"改成被导入的project的namespace 'com.example.XXX’和 applicationId “com.example.XXX”

一般也会报版本不对,也把 compileSdk 33 targetSdk 33 minSdk 16也改成被导入的project的同款

-------------------------------------------------好记性不如烂笔头这里记一记地

评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值