-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
编译出错 #5
Comments
Dagger2 和 ARouter都有注解处理器,应该是互不干扰的,看日志是Dagger没有生成inject类,有完整的编译Log么?太长的话,可以发到我邮箱 zhilong.liu@aliyun.com |
日志也不是很长。我就发这吧。在rebuild的时候就compile failed Parallel execution with configuration on demand is an incubating feature. :webapi:compileRetrolambdaRelease :webapi:mockableAndroidJar UP-TO-DATE FAILED FAILURE: Build failed with an exception.
BUILD FAILED Total time: 22.562 secs |
@SelfImpro 我不认为是这个问题,因为readme里要求的已经配置了。而且看日志是读取到了。 |
@SelfImpro 或者你的意思是不使用apt,改用annotationProcessor来编译吗? |
我测试了一下,和Dagger2一起使用没有问题 |
我这边会使用Dagger2来注入比较多的东西,presenter,service等,方便提供一下你测试的gradle配置文件吗,我对比下。 |
@recwert 恩,我之前看错了,因为我之前修改成 |
@SelfImpro 你是使用了Gradle 3吗? |
Gradle3应该才更新的吧,我用的还是2.2.3。我只是习惯性的把项目里面的 |
@SelfImpro :app:compileDebugJavaWithJavac FAILED FAILURE: Build failed with an exception.
|
@zhi1ong 我这边把path 从/train 改成/train/train 就这正常了。应该是个bug了。 |
这个是正常情况,本身是要求path至少包含两段,只有一段的话,会在编译校验的时候抛错,看你之前的抛错确实是因为编译期出现RuntimeException,但是没有把错误打印出来,我也去看一看,应该是Log没打印出来,感谢发现问题。 if (StringUtils.isEmpty(meta.getGroup())) { // Use default group(the first word in path)
|
刚刚没注意到,日志打出来了,但是第一次你贴的Log里面没有呢
|
必须要配置group属性 虽然demo里面都没有配 |
Gradle Version: Gradle 3.3
Gradle Plugin Version: gradle:2.3.0-beta2
我按照readme和demo的方式配置了gradle,工程里之前也配置了Dagger2,用的annotationProcessor,
之前都是正常的,使用了ARouter之后,就编译不过了。gradle console给了下面的错误,不知道是什么原因导致了Dagger2没有编译成功。
注: ARouter::Compiler The user has configuration the module name, it was [app]
注: ARouter::Compiler >>> InterceptorProcessor init. <<<
警告: No SupportedSourceVersion annotation found on com.alibaba.android.arouter.compiler.processor.InterceptorProcessor, returning RELEASE_6.
警告: 来自注释处理程序 'com.alibaba.android.arouter.compiler.processor.InterceptorProcessor' 的受支持 source 版本 'RELEASE_6' 低于 -source '1.8'
注: ARouter::Compiler The user has configuration the module name, it was [app]
注: ARouter::Compiler >>> RouteProcessor init. <<<
/Users/admin/Desktop/Ukee/app/src/main/java/com/yujie/ukee/App.java:10: 错误: 找不到符号
import com.yujie.ukee.dagger.injection.DaggerAppComponent;
^
符号: 类 DaggerAppComponent
位置: 程序包 com.yujie.ukee.dagger.injection
The text was updated successfully, but these errors were encountered: