第三方SDK(Facebook)导致我的Android应用程序的构建失败,因为无法创建其javadoc!这是Android Studio 1.2 RC0的闪亮新功能之一,因为在更新之前一切都运行良好。 这是确切的错误消息:
$json = '{"objects":[{"type":"text","originX":"left","originY":"top","left":46.05,"top":129.71,"width":412.09,"height":52,"fill":"rgb(0,0,0)","stroke":null,"strokeWidth":1,"strokeDashArray":null,"strokeLineCap":"butt","strokeLineJoin":"miter","strokeMiterLimit":10,"scaleX":1.33,"scaleY":1.33,"angle":352.36,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"clipTo":null,"backgroundColor":"red","fillRule":"nonzero","globalCompositeOperation":"source-over","text":"companyName","fontSize":40,"fontWeight":"normal","fontFamily":"Delicious_500","fontStyle":"","lineHeight":1.3,"textDecoration":"","textAlign":"left","path":null,"textBackgroundColor":"","useNative":true}],"background":""}';
$data = json_decode($json, true);
$data['objects'][0]['text'] = 'New text';
$newJson = json_encode($data);
echo $newJson;
现在我根本不关心Facebook javadocs!那么我该如何从构建中删除Facebook SDK的javadoc代码呢?即如何让项目再次编译和执行? 欢迎任何建议,谢谢!
答案 0 :(得分:4)
在这里找到解决方案:
https://bitbucket.org/hvisser/android-apt/issue/35/prevent-facebook-module-to-compile
我已经过了这一行:我的build.gradle文件中的tasks.findByPath(":facebook:androidJavadocs").enabled = false
答案 1 :(得分:3)
按模块添加Gradle:
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
}