Giter Site home page Giter Site logo

编译出错 about arouter HOT 14 CLOSED

alibaba avatar alibaba commented on May 17, 2024
编译出错

from arouter.

Comments (14)

zhi1ong avatar zhi1ong commented on May 17, 2024

Dagger2 和 ARouter都有注解处理器,应该是互不干扰的,看日志是Dagger没有生成inject类,有完整的编译Log么?太长的话,可以发到我邮箱 [email protected]

from arouter.

recwert avatar recwert commented on May 17, 2024

日志也不是很长。我就发这吧。在rebuild的时候就compile failed
Executing tasks: [clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:compileDebugSources, :app:compileDebugUnitTestSources, :app:compileDebugAndroidTestSources, :webapi:generateDebugSources, :webapi:mockableAndroidJar, :webapi:prepareDebugUnitTestDependencies, :webapi:generateDebugAndroidTestSources, :webapi:compileDebugSources, :webapi:compileDebugUnitTestSources, :webapi:compileDebugAndroidTestSources]

Parallel execution with configuration on demand is an incubating feature.
Using the 'clean' task in combination with parallel execution may lead to unexpected runtime behavior.
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
extractDebugAnnotations is incompatible with java 8 sources and has been disabled.
extractReleaseAnnotations is incompatible with java 8 sources and has been disabled.
WARNING: Using incompatible plugins for the annotation processing: android-apt. This may result in an unexpected behavior.
Jack is disabled, but one of the plugins you are using supports Java 8 language features.
WARNING: Using incompatible plugins for the annotation processing: android-apt. This may result in an unexpected behavior.
Jack is disabled, but one of the plugins you are using supports Java 8 language features.
:clean
:app:clean
:webapi:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:extractProguardFiles
:app:preReleaseBuild
:app:prepareComAlibabaArouterApi102Library
:app:prepareComAndroidSupportAnimatedVectorDrawable2510Library
:app:prepareComAndroidSupportAppcompatV72510Library
:app:prepareComAndroidSupportCardviewV72510Library
:app:prepareComAndroidSupportDesign2510Library
:app:prepareComAndroidSupportRecyclerviewV72510Library
:app:prepareComAndroidSupportSupportCompat2510Library
:app:prepareComAndroidSupportSupportCoreUi2510Library
:app:prepareComAndroidSupportSupportCoreUtils2510Library
:app:prepareComAndroidSupportSupportFragment2510Library
:app:prepareComAndroidSupportSupportMediaCompat2510Library
:app:prepareComAndroidSupportSupportV42510Library
:app:prepareComAndroidSupportSupportVectorDrawable2510Library
:app:prepareComAndroidSupportTransition2510Library
:app:prepareComFacebookFrescoDrawee100Library
:app:prepareComFacebookFrescoFbcore100Library
:app:prepareComFacebookFrescoFresco100Library
:app:prepareComFacebookFrescoImagepipeline100Library
:app:prepareComFacebookFrescoImagepipelineBase100Library
:app:prepareComGithubCymChadBaseRecyclerViewAdapterHelper276Library
:app:prepareComGithubFranmontielPersistentCookieJarV100Library
:app:prepareComJaegerStatusbaruitlLibrary133Library
:app:prepareComJakewhartonButterknife840Library
:app:prepareIoReactivexRxjava2Rxandroid201Library
:app:generateDebugBuildConfig
:app:generateDebugResValues
:app:mockableAndroidJar
:webapi:preBuild UP-TO-DATE
:webapi:preReleaseBuild UP-TO-DATE
:webapi:checkReleaseManifest
:webapi:preDebugAndroidTestBuild UP-TO-DATE
:webapi:preDebugBuild UP-TO-DATE
:webapi:preDebugUnitTestBuild UP-TO-DATE
:webapi:preReleaseUnitTestBuild UP-TO-DATE
:webapi:prepareComAndroidSupportAnimatedVectorDrawable2510Library
:webapi:prepareComAndroidSupportAppcompatV72510Library
:webapi:prepareComAndroidSupportSupportCompat2510Library
:webapi:prepareComAndroidSupportSupportCoreUi2510Library
:webapi:prepareComAndroidSupportSupportCoreUtils2510Library
:webapi:prepareComAndroidSupportSupportFragment2510Library
:webapi:prepareComAndroidSupportSupportMediaCompat2510Library
:webapi:prepareComAndroidSupportSupportV42510Library
:webapi:prepareComAndroidSupportSupportVectorDrawable2510Library
:webapi:prepareComGithubFranmontielPersistentCookieJarV100Library
:webapi:prepareIoReactivexRxjava2Rxandroid201Library
:webapi:prepareReleaseDependencies
:webapi:compileReleaseAidl
:webapi:compileReleaseNdk UP-TO-DATE
:webapi:compileLint
:webapi:copyReleaseLint UP-TO-DATE
:webapi:compileReleaseRenderscript
:webapi:generateReleaseBuildConfig
:webapi:generateReleaseResValues
:webapi:generateReleaseResources
:webapi:mergeReleaseResources
:webapi:processReleaseManifest
:webapi:processReleaseResources
:webapi:generateReleaseSources
:webapi:incrementalReleaseJavaCompilationSafeguard
:webapi:javaPreCompileRelease
:webapi:compileReleaseJavaWithJavac
注: /Users/admin/Desktop/Ukee/webapi/src/main/java/com/donew/webapi/core/WebApi.java使用了未经检查或不安全的操作。
注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。

:webapi:compileRetrolambdaRelease
:webapi:extractReleaseAnnotations
:webapi:mergeReleaseShaders
:webapi:compileReleaseShaders
:webapi:generateReleaseAssets
:webapi:mergeReleaseAssets
:webapi:mergeReleaseProguardFiles UP-TO-DATE
:webapi:packageReleaseRenderscript UP-TO-DATE
:webapi:packageReleaseResources
:webapi:processReleaseJavaRes UP-TO-DATE
:webapi:transformResourcesWithMergeJavaResForRelease
:webapi:transformClassesAndResourcesWithSyncLibJarsForRelease
:webapi:mergeReleaseJniLibFolders
:webapi:transformNativeLibsWithMergeJniLibsForRelease
:webapi:transformNativeLibsWithStripDebugSymbolForRelease
:webapi:transformNativeLibsWithSyncJniLibsForRelease
:webapi:bundleRelease
:webapi:checkDebugManifest
:webapi:prepareDebugDependencies
:webapi:compileDebugAidl
:webapi:compileDebugRenderscript
:webapi:generateDebugBuildConfig
:webapi:generateDebugResValues
:webapi:generateDebugResources
:webapi:mergeDebugResources
:webapi:processDebugManifest
:webapi:processDebugResources
:webapi:generateDebugSources
:webapi:prepareDebugUnitTestDependencies
:webapi:prepareComAndroidSupportTestEspressoEspressoCore222Library
:webapi:prepareComAndroidSupportTestEspressoEspressoIdlingResource222Library
:webapi:prepareComAndroidSupportTestExposedInstrumentationApiPublish05Library
:webapi:prepareComAndroidSupportTestRules05Library
:webapi:prepareComAndroidSupportTestRunner05Library
:webapi:prepareDebugAndroidTestDependencies
:webapi:compileDebugAndroidTestAidl
:webapi:compileDebugNdk UP-TO-DATE
:webapi:copyDebugLint UP-TO-DATE
:webapi:incrementalDebugJavaCompilationSafeguard
:webapi:javaPreCompileDebug
:webapi:compileDebugJavaWithJavac
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugResources
:app:mergeDebugResources
注: /Users/admin/Desktop/Ukee/webapi/src/main/java/com/donew/webapi/core/WebApi.java使用了未经检查或不安全的操作。
注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。

:webapi:mockableAndroidJar UP-TO-DATE
:webapi:compileRetrolambdaDebug
:webapi:extractDebugAnnotations
:webapi:mergeDebugShaders
:webapi:compileDebugShaders
:webapi:generateDebugAssets
:webapi:mergeDebugAssets
:webapi:mergeDebugProguardFiles UP-TO-DATE
:webapi:packageDebugRenderscript UP-TO-DATE
:webapi:packageDebugResources
:webapi:processDebugJavaRes UP-TO-DATE
:webapi:transformResourcesWithMergeJavaResForDebug
:webapi:transformClassesAndResourcesWithSyncLibJarsForDebug
:webapi:mergeDebugJniLibFolders
:webapi:transformNativeLibsWithMergeJniLibsForDebug
:webapi:transformNativeLibsWithStripDebugSymbolForDebug
:webapi:transformNativeLibsWithSyncJniLibsForDebug
:webapi:bundleDebug
:webapi:processDebugAndroidTestManifest
:webapi:compileDebugAndroidTestRenderscript
:webapi:generateDebugAndroidTestBuildConfig
:webapi:generateDebugAndroidTestResValues
:webapi:generateDebugAndroidTestResources
:webapi:mergeDebugAndroidTestResources
:app:processDebugManifest
:app:processDebugResources
:webapi:processDebugAndroidTestResources
:webapi:generateDebugAndroidTestSources
:webapi:compileDebugSources
:webapi:incrementalDebugUnitTestJavaCompilationSafeguard UP-TO-DATE
:webapi:javaPreCompileDebugUnitTest
:webapi:compileDebugUnitTestJavaWithJavac
:webapi:processDebugUnitTestJavaRes UP-TO-DATE
:webapi:compileDebugUnitTestSources
:webapi:incrementalDebugAndroidTestJavaCompilationSafeguard
:webapi:javaPreCompileDebugAndroidTest
:webapi:compileDebugAndroidTestJavaWithJavac
:app:generateDebugSources
:app:preDebugUnitTestBuild UP-TO-DATE
:app:prepareDebugUnitTestDependencies
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareComAndroidSupportTestEspressoEspressoCore222Library
:app:prepareComAndroidSupportTestEspressoEspressoIdlingResource222Library
:app:prepareComAndroidSupportTestExposedInstrumentationApiPublish05Library
:app:prepareComAndroidSupportTestRules05Library
:app:prepareComAndroidSupportTestRunner05Library
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl
:app:processDebugAndroidTestManifest
:app:compileDebugAndroidTestRenderscript
:app:generateDebugAndroidTestBuildConfig
:app:generateDebugAndroidTestResValues
:app:generateDebugAndroidTestResources
:app:mergeDebugAndroidTestResources
:app:processDebugAndroidTestResources
:app:generateDebugAndroidTestSources
:webapi:compileRetrolambdaDebugAndroidTest
:app:incrementalDebugJavaCompilationSafeguard
:app:javaPreCompileDebug
:app:compileDebugJavaWithJavac
注: 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:9: 错误: 找不到符号
import com.yujie.ukee.dagger.injection.DaggerAppComponent;
^
符号: 类 DaggerAppComponent
位置: 程序包 com.yujie.ukee.dagger.injection
/Users/admin/Desktop/Ukee/app/src/main/java/com/yujie/ukee/home/view/impl/HomeDiscoverFragment.java:17: 错误: 找不到符号
import com.yujie.ukee.home.injection.DaggerHomeDiscoverViewComponent;
^
符号: 类 DaggerHomeDiscoverViewComponent
位置: 程序包 com.yujie.ukee.home.injection
/Users/admin/Desktop/Ukee/app/src/main/java/com/yujie/ukee/home/view/impl/HomeTrainFragment.java:17: 错误: 找不到符号
import com.yujie.ukee.home.injection.DaggerHomeTrainViewComponent;
^
符号: 类 DaggerHomeTrainViewComponent
位置: 程序包 com.yujie.ukee.home.injection
/Users/admin/Desktop/Ukee/app/src/main/java/com/yujie/ukee/home/view/impl/MainActivity.java:14: 错误: 找不到符号
import com.yujie.ukee.home.injection.DaggerMainViewComponent;
^
符号: 类 DaggerMainViewComponent
位置: 程序包 com.yujie.ukee.home.injection
/Users/admin/Desktop/Ukee/app/src/main/java/com/yujie/ukee/login/view/impl/LoginActivity.java:10: 错误: 找不到符号
import com.yujie.ukee.login.injection.DaggerLoginViewComponent;
^
符号: 类 DaggerLoginViewComponent
位置: 程序包 com.yujie.ukee.login.injection
/Users/admin/Desktop/Ukee/app/src/main/java/com/yujie/ukee/regist/view/impl/RegisterActivity.java:10: 错误: 找不到符号
import com.yujie.ukee.regist.injection.DaggerRegisterViewComponent;
^
符号: 类 DaggerRegisterViewComponent
位置: 程序包 com.yujie.ukee.regist.injection
/Users/admin/Desktop/Ukee/app/src/main/java/com/yujie/ukee/train/view/impl/TrainDetailActivity.java:19: 错误: 找不到符号
import com.yujie.ukee.train.injection.DaggerTrainDetailViewComponent;
^
符号: 类 DaggerTrainDetailViewComponent
位置: 程序包 com.yujie.ukee.train.injection
/Users/admin/Desktop/Ukee/app/src/main/java/com/yujie/ukee/train/view/impl/TrainsActivity.java:9: 错误: 找不到符号
import com.yujie.ukee.train.injection.DaggerTrainsViewComponent;
^
符号: 类 DaggerTrainsViewComponent
位置: 程序包 com.yujie.ukee.train.injection
警告: 以下选项未被任何处理程序识别: '[moduleName]'
8 个错误
2 个警告

FAILED
:app:compileRetrolambdaDebug
Retrolambda 2.0.6
Bytecode version: 50 (Java 6)
Default methods: false
Input directory: /Users/admin/Desktop/Ukee/app/build/retrolambda/debug
Output directory: /Users/admin/Desktop/Ukee/app/build/intermediates/classes/debug
Classpath: /Users/admin/.android/build-cache/0a33d36033785e5d31398635194d3c6210fd6409/output/jars/classes.jar:/Users/admin/.gradle/caches/modules-2/files-2.1/com.google.dagger/dagger/2.8/55a1aa1cdcfd06b9950ca856e2bc2790e105146a/dagger-2.8.jar:/Users/admin/.gradle/caches/modules-2/files-2.1/javax.inject/javax.inject/1/6975da39a7040257bd51d21a231b76c915872d38/javax.inject-1.jar:/Users/admin/.android/build-cache/2987885fcd09a7ebbbf35d576b4f966e524b21e5/output/jars/classes.jar:/Users/admin/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife-annotations/8.4.0/ea392375cf9ff59234a82e7928a204215ccc98cd/butterknife-annotations-8.4.0.jar:/Users/admin/.android/build-cache/42f29c1ff17635f4c22513e1e91dfb9c27a3619c/output/jars/classes.jar:/Users/admin/.android/build-cache/2a917299b62471ab11cdd286a5fb057b20f7dc23/output/jars/classes.jar:/Users/admin/.android/build-cache/c0a3c876ae8d7081e494c3fbfd12384281ee6f85/output/jars/classes.jar:/Users/admin/.android/build-cache/f381dd49b1a2b700938d02ee2ce62547fe71bab1/output/jars/classes.jar:/Users/admin/.android/build-cache/881e251a6e303d3d1c9495b83533f198f64f1db1/output/jars/classes.jar:/Users/admin/.android/build-cache/58a909dc0936aa943cc89190fcfb07da4567bf8c/output/jars/classes.jar:/Users/admin/.android/build-cache/871cf611635164cbdd87991f15a4d13f78f698dd/output/jars/classes.jar:/Users/admin/.android/build-cache/af258aa4ad023a1a179e239676df0f106c2d85d5/output/jars/classes.jar:/Users/admin/.android/build-cache/391995ef4158bda16fbcb61fd668d0a8938259cc/output/jars/classes.jar:/Users/admin/.gradle/caches/modules-2/files-2.1/com.parse.bolts/bolts-tasks/1.4.0/d85884acf6810a3bbbecb587f239005cbc846dc4/bolts-tasks-1.4.0.jar:/Users/admin/.android/build-cache/75aab36246953911a5791b1204c5e27b786a14cd/output/jars/classes.jar:/Users/admin/.android/build-cache/a5c02ec0a3d2cb60aea35ec97c37115e50deffdc/output/jars/classes.jar:/Users/admin/.gradle/caches/modules-2/files-2.1/com.alibaba/arouter-annotation/1.0.0/b16151dbac221b60cbae8eb2e6a6af51c8395645/arouter-annotation-1.0.0.jar:/Users/admin/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.4/5fe28b9518e58819180a43a850fbc0dd24b7c050/commons-lang3-3.4.jar:/Users/admin/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-collections4/4.1/a4cf4688fe1c7e3a63aa636cc96d013af537768e/commons-collections4-4.1.jar:/Users/admin/Desktop/Ukee/webapi/build/intermediates/bundles/default/classes.jar:/Users/admin/.android/build-cache/9b42fb2804a0a1f92b88cdf35c5d818a2a1104e5/output/jars/classes.jar:/Users/admin/.android/build-cache/5fa42b2e9d1e702861960fa72ac9edcb031c1707/output/jars/classes.jar:/Users/admin/.android/build-cache/05d377af64b2d080634531e15abab07db8fe5c03/output/jars/classes.jar:/Users/admin/.android/build-cache/fd2458ac00ce987811b6baa14bb5eba367c8c3f3/output/jars/classes.jar:/Users/admin/.android/build-cache/99157eed50c9d8038b1e9394c91580311e4dc2c9/output/jars/classes.jar:/Users/admin/.android/build-cache/3b8757d1ce33bd8d3b7dded2713404b3f0fac4fb/output/jars/classes.jar:/Users/admin/.android/build-cache/66beaedb45b009b892fa57eaeb652de84e2c84c2/output/jars/classes.jar:/Users/admin/.android/build-cache/9e272a1709d396db987af6c198385d8028543ba0/output/jars/classes.jar:/Users/admin/.android/build-cache/2ad82dec2af37ad9e8339bd2cd823623c372c763/output/jars/classes.jar:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/25.1.0/support-annotations-25.1.0.jar:/Users/admin/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/20.0/89507701249388e1ed5ddcf8c41f4ce1be7831ef/guava-20.0.jar:/Users/admin/.android/build-cache/8b7c5c84566e67465dc090a295d6e2637d9f6b63/output/jars/classes.jar:/Users/admin/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/converter-gson/2.1.0/aa557d71ead91cbf26e0c316a0f593d168303309/converter-gson-2.1.0.jar:/Users/admin/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.7/751f548c85fa49f330cecbb1875893f971b33c4e/gson-2.7.jar:/Users/admin/.gradle/caches/modules-2/files-2.1/com.jakewharton.retrofit/retrofit2-rxjava2-adapter/1.0.0/e117362a2103f8ec01091ebd2f40aca4e1ada599/retrofit2-rxjava2-adapter-1.0.0.jar:/Users/admin/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/retrofit/2.1.0/2de7cd8b95b7021b1d597f049bcb422055119f2c/retrofit-2.1.0.jar:/Users/admin/.gradle/caches/modules-2/files-2.1/io.reactivex.rxjava2/rxjava/2.0.1/57f850a6b317e5582f1dbaff10a9e7d7e1fcdcfb/rxjava-2.0.1.jar:/Users/admin/.gradle/caches/modules-2/files-2.1/org.reactivestreams/reactive-streams/1.0.0/14b8c877d98005ba3941c9257cfe09f6ed0e0d74/reactive-streams-1.0.0.jar:/Users/admin/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/logging-interceptor/3.5.0/94c11f915bfe1aeaa5ef6351ddfbe58bae1ea397/logging-interceptor-3.5.0.jar:/Users/admin/.android/build-cache/617b01ea34b431366f52a377eaa7b098c0e94ee2/output/jars/classes.jar:/Users/admin/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/3.5.0/4b0bb6bfbecbdd42b97ff400af342bfe7f32bc83/okhttp-3.5.0.jar:/Users/admin/.gradle/caches/modules-2/files-2.1/com.squareup.okio/okio/1.11.0/840897fcd7223a8143f1d9b6f69714e7be34fd50/okio-1.11.0.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/rt.jar:/Users/admin/Desktop/Ukee/app/build/retrolambda/debug:/Users/admin/Library/Android/sdk/platforms/android-25/android.jar

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 22.562 secs

from arouter.

recwert avatar recwert commented on May 17, 2024

@SelfImpro 我不认为是这个问题,因为readme里要求的已经配置了。而且看日志是读取到了。
apt {
arguments {
moduleName project.getName();
}
}

from arouter.

recwert avatar recwert commented on May 17, 2024

@SelfImpro 或者你的意思是不使用apt,改用annotationProcessor来编译吗?

from arouter.

zhi1ong avatar zhi1ong commented on May 17, 2024

我测试了一下,和Dagger2一起使用没有问题
如果用dagger2仅仅是为了注入service的话,可以单独用ARouter,ARouter本身提供了服务管理的功能,用起来相对简单

from arouter.

recwert avatar recwert commented on May 17, 2024

我这边会使用Dagger2来注入比较多的东西,presenter,service等,方便提供一下你测试的gradle配置文件吗,我对比下。

from arouter.

SelfImpro avatar SelfImpro commented on May 17, 2024

@recwert 恩,我之前看错了,因为我之前修改成annotationProcessor忘记配置moduleName报过一次错。我感觉可以先试着统一用annotationProcessor来编译。

from arouter.

recwert avatar recwert commented on May 17, 2024

@SelfImpro 你是使用了Gradle 3吗?

from arouter.

SelfImpro avatar SelfImpro commented on May 17, 2024

Gradle3应该才更新的吧,我用的还是2.2.3。我只是习惯性的把项目里面的apt都改用annotationProcessor

from arouter.

recwert avatar recwert commented on May 17, 2024

@SelfImpro
我这边使用annotationProcessor还是有一样的错误。提示是配置了module name了。
注: 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. <<<
注: ARouter::Compiler >>> Found routes, start... <<<
注: ARouter::Compiler >>> Found routes, size is 1 <<<
注: ARouter::Compiler >>> Found activity route: com.yujie.ukee.train.view.impl.TrainDetailActivity <<<
错误: ARouter::Compiler An exception is encountered, [Failed to extract default group! String index out of range: -2]
警告: ARouter::Compiler >>> Route meta verify error, group is <<<
注: ARouter::Compiler >>> Generated provider map, name is ARouter$$Providers$$app <<<
注: ARouter::Compiler >>> Generated root, name is ARouter$$Root$$app <<<
注: ARouter::Compiler >>> Found routes, start... <<<
9 个错误
3 个警告

:app:compileDebugJavaWithJavac FAILED
:app:compileRetrolambdaDebug

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

from arouter.

recwert avatar recwert commented on May 17, 2024

@zhi1ong 我这边把path 从/train 改成/train/train 就这正常了。应该是个bug了。

from arouter.

zhi1ong avatar zhi1ong commented on May 17, 2024

这个是正常情况,本身是要求path至少包含两段,只有一段的话,会在编译校验的时候抛错,看你之前的抛错确实是因为编译期出现RuntimeException,但是没有把错误打印出来,我也去看一看,应该是Log没打印出来,感谢发现问题。

if (StringUtils.isEmpty(meta.getGroup())) { // Use default group(the first word in path)
try {
String defaultGroup = path.substring(1, path.indexOf("/", 1));
if (StringUtils.isEmpty(defaultGroup)) {
return false;
}

            meta.setGroup(defaultGroup);
            return true;
        } catch (Exception e) {
            logger.error("Failed to extract default group! " + e.getMessage());
            return false;
        }
   }

from arouter.

zhi1ong avatar zhi1ong commented on May 17, 2024

刚刚没注意到,日志打出来了,但是第一次你贴的Log里面没有呢

注: ARouter::Compiler >>> Found activity route: com.yujie.ukee.train.view.impl.TrainDetailActivity <<<
错误: ARouter::Compiler An exception is encountered, [Failed to extract default group! String index out of range: -2]
警告: ARouter::Compiler >>> Route meta verify error, group is <<<
注: ARouter::Compiler >>> Generated provider map, name is ARouter$$Providers$$app <<<
注: ARouter::Compiler >>> Generated root, name is ARouter$$Root$$app <<<
注: ARouter::Compiler >>> Found routes, start... <<<
9 个错误
3 个警告

from arouter.

interestinghua avatar interestinghua commented on May 17, 2024

必须要配置group属性 虽然demo里面都没有配

from arouter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.