如何从项目构建中删除或禁用

如何从项目构建中删除或禁用

本文介绍了Android Studio:如何从项目构建中删除或禁用 javadoc 生成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

第三方 SDK (Facebook) 导致我的 Android 应用程序构建失败,因为无法创建其 javadoc!这是 Android Studio 1.2 RC0 的闪亮新功能之一,因为在更新之前一切正常.这是确切的错误消息:

A third party SDK (Facebook) causes the build of my Android App to fail because its javadocs can not be created! This is one of the shiny new features of Android Studio 1.2 RC0, as everything worked perfectly before the update.Here's the exact error message:

22:39:55.176 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
22:39:55.176 [ERROR] [org.gradle.BuildExceptionReporter]
22:39:55.177 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
22:39:55.177 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':facebook-sdk:androidJavadocs'.
22:39:55.177 [ERROR] [org.gradle.BuildExceptionReporter] > Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): '/..../project/libraries/facebook-android-sdk/facebook/build/tmp/androidJavadocs/javadoc.options'

现在我根本不在乎 Facebook 的 javadoc!那么我该怎么做才能从构建中删除 Facebook SDK 的 javadoc 生成呢?IE.我怎样才能让项目再次编译和执行?
欢迎任何建议,谢谢!

Now I don't care about the Facebook javadocs at all! So what do I have to do to remove the javadoc generation of the Facebook SDK from the build? I.e. How can I get the project to compile and execute again?
Any advice is welcome, thank you!

推荐答案

按模块添加 Gradle:

Add Gradle by module:

tasks.withType(Javadoc) {
    options.addStringOption('Xdoclint:none', '-quiet')
    options.addStringOption('encoding', 'UTF-8')
    options.addStringOption('charSet', 'UTF-8')
}

这篇关于Android Studio:如何从项目构建中删除或禁用 javadoc 生成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 12:09