AS build出错
2018-12-04 本文已影响29人
BugFree张瑞
Android Studio 3.1 not showing build error details
https://stackoverflow.com/questions/49637589/android-studio-3-1-not-showing-build-error-details
There is a toggle button just below the build button that will show the verbose build logs. Tap that and you should be able to see errors like before AS 3.1.
![](https://img.haomeiwen.com/i8572096/958c9aa468b0475d.png)
亲测有效。
然后发现问题是:错误: No option eventBusIndex passed to annotation processor 导致编译失败
因为应用 EventBusAnnotationProcessor 却没有设置 arguments,编译时会报错:No option eventBusIndex passed to annotation processor,此时需要先编译一次,生成索引类。编译成功之后,会在 \ProjectName\app\build\generated\source\apt\PakageName\ 下看到通过注解分析生成的索引类,如此便可在初始化 EventBus 时应用生成的索引了。
解决办法:Remove compile 'org.greenrobot:eventbus-annotation-processor:3.0.1'