java - 任务 ';checkDebugManifest'的配置出错

标签 java android spring gradle

我正在Spring Guide的帮助下用Gradle构建我的第一个android项目。运行gradle build时,出现以下错误:

* What went wrong:
A problem was found with the configuration of task ':checkDebugManifest'.
> File 'C:\Windows\System32\src\main\AndroidManifest.xml' specified for property 'manifest' does not
 exist.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more l
og output.

BUILD FAILED

Here is the AndroidManifest file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hello"
android:versionCode="1"
android:versionName="1.0.0" >

<application android:label="@string/app_name" >
    <activity
        android:name=".HelloActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
 </application>

</manifest>

最佳答案

可能您是从C:\Windows\System32文件夹运行Gradle的。我不确定您是否也将build.gradle放在这里。您需要考虑您的项目在哪里,然后在此处运行Gradle以提供适当的上下文。

关于java - 任务 ';checkDebugManifest'的配置出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28110165/

相关文章:

java - OpenWire是哪一层协议(protocol)

java - IllegalArgumentException 在 Java 中无法正常运行

Java:为什么结果是5而不是10?

java - 在 android studio 中按下按钮后如何更改按钮的文本?

java - 未找到@Autowired bean

java - 如何使用 SVNKit 添加/提交新文件到 SVN

java - 将对象传递给新 Activity 返回 null

android - 缺少必需的 XML 属性 'adSize'

spring - 以编程方式将新路由添加到 zuul 代理

java - Spring security自定义注销空指针异常