Android的工作室清单缺少错误在摇篮 [英] Android Studio Manifest Missing Error In Gradle

查看:191
本文介绍了Android的工作室清单缺少错误在摇篮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找出我做我的项目。我最近添加ActionBarSherlock到我的项目下的主项目/库/ ActionBarSherlock 。当我这样做,事情发生到我的清单文件路径,因为目前该项目无法找到它,我在调试收到此错误。

I'm trying to figure out what I've done to my project. I recently added ActionBarSherlock to my project under the main project/library/ActionBarSherlock. When I did that something happened to my manifest file path because now the project cannot find it and I'm getting this error on Debug.

摇篮:

失败:建立失败,一个异常

FAILURE: Build failed with an exception.

  • 出了什么问题: 发生问题配置根项目ToDoListProject。

  • What went wrong: A problem occurred configuring root project 'ToDoListProject'.

    未能通知项目评估听众。   从C主要清单丢失:\用户\克里斯 - 约翰逊\ AndroidStudioProjects \ ToDoListProject的\ src \ MAIN \ AndroidManifest.xml中

    Failed to notify project evaluation listener. Main Manifest missing from C:\Users\Chris Johnson\AndroidStudioProjects\ToDoListProject\src\main\AndroidManifest.xml

    尝试: 与--stacktrace选项获取堆栈跟踪运行。与--info或--debug选项运行,以获得更多的日志输出。

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    也找不到明显的原因是因为它位于在文件

    The reason it can't find the manifest is because it's located in the file

    C:\Users\Chris Johnson\AndroidStudioProjects\ToDoListProject\ToDoList\src\main\AndroidManifest.xml
    

    我如何重新设置到正确的位置?

    How do I set it to the correct location again?

    感谢。

    推荐答案

    机器人部分的 build.gradle 文件,你可以尝试添加 sourceSets manifest.srcFile 变量。

    In the android section of your build.gradle file, you can try adding sourceSets with the manifest.srcFile variable.

    android {
      sourceSets {
          main {
              manifest.srcFile 'ToDoList/src/main/AndroidManifest.xml'
          }
      }
    }
    

    这是路径可能需要略作调整。

    That path may need to be adjusted slightly.

    这篇关于Android的工作室清单缺少错误在摇篮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆