小编Jel*_*ish的帖子

未指定命名空间。请在模块的 build.gradle 文件中指定命名空间

当我尝试使用以下命令构建反应本机应用程序时,我不断收到错误消息npx expo run:android

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
   > A problem occurred configuring project ':react-native-webview'.
      > Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
         > Namespace not specified. Please specify a namespace in the module's build.gradle file like so:

           android {
               namespace 'com.example.namespace'
           }
Run Code Online (Sandbox Code Playgroud)

然而,在android/app/build.gradle

...
android {
    ndkVersion rootProject.ext.ndkVersion
    compileSdkVersion rootProject.ext.compileSdkVersion
    namespace 'com.wilburcoding.BirdSoundSearch'
...
Run Code Online (Sandbox Code Playgroud)

网上似乎没有任何答案对这个问题有有效/有效的答案。看来这个问题可能源自react-native-webview. 这是依赖问题还是 gradle 问题?

android gradle react-native expo

4
推荐指数
1
解决办法
6599
查看次数

标签 统计

android ×1

expo ×1

gradle ×1

react-native ×1