我正在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/