Cannot resolve symbol
"D:\Program Files\Java\jdk1.8.0_131\bin\java" "-Dmaven.home=H:\happymall tool\apache-maven-3.0.5" "-Dclassworlds.conf=H:\happymall tool\apache-maven-3.0.5\bin\m2.conf" -Didea.launcher.port=7533 "-Didea.launcher.bin.path=D:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0.6\bin" -Dfile.encoding=UTF-8 -classpath "H:\happymall tool\apache-maven-3.0.5\boot\plexus-classworlds-2.4.jar;D:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0.6\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=15.0.6 --update-snapshots install [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building o2o_demo 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ o2o_demo --- [debug] execute contextualize [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 8 resources [INFO] [INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ o2o_demo --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 15 source files to H:\1-慕课就业班\校园商铺V1\o2o_demo\target\classes [INFO] [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ o2o_demo --- [debug] execute contextualize [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ o2o_demo --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 4 source files to H:\1-慕课就业班\校园商铺V1\o2o_demo\target\test-classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /H:/1-慕课就业班/校园商铺V1/o2o_demo/src/test/java/com/imooc/o2o/dao/ShopDaoTest.java:[17,20] 需要<标识符> [ERROR] /H:/1-慕课就业班/校园商铺V1/o2o_demo/src/test/java/com/imooc/o2o/dao/ShopDaoTest.java:[17,21] 非法的类型开始 [ERROR] /H:/1-慕课就业班/校园商铺V1/o2o_demo/src/test/java/com/imooc/o2o/dao/ShopDaoTest.java:[18,19] 需要<标识符> [ERROR] /H:/1-慕课就业班/校园商铺V1/o2o_demo/src/test/java/com/imooc/o2o/dao/ShopDaoTest.java:[18,20] 非法的类型开始 [ERROR] /H:/1-慕课就业班/校园商铺V1/o2o_demo/src/test/java/com/imooc/o2o/dao/ShopDaoTest.java:[19,35] 需要<标识符> [ERROR] /H:/1-慕课就业班/校园商铺V1/o2o_demo/src/test/java/com/imooc/o2o/dao/ShopDaoTest.java:[19,36] 非法的类型开始 [ERROR] /H:/1-慕课就业班/校园商铺V1/o2o_demo/src/test/java/com/imooc/o2o/dao/ShopDaoTest.java:[20,21] 需要<标识符> [ERROR] /H:/1-慕课就业班/校园商铺V1/o2o_demo/src/test/java/com/imooc/o2o/dao/ShopDaoTest.java:[20,26] 需要<标识符> [INFO] 8 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.452s [INFO] Finished at: Sat Jun 22 10:55:46 CST 2019 [INFO] Final Memory: 17M/155M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:testCompile (default-testCompile) on project o2o_demo: Compilation failure: Compilation failure: [ERROR] /H:/1-慕课就业班/校园商铺V1/o2o_demo/src/test/java/com/imooc/o2o/dao/ShopDaoTest.java:[17,20] 需要<标识符> [ERROR] /H:/1-慕课就业班/校园商铺V1/o2o_demo/src/test/java/com/imooc/o2o/dao/ShopDaoTest.java:[17,21] 非法的类型开始 [ERROR] /H:/1-慕课就业班/校园商铺V1/o2o_demo/src/test/java/com/imooc/o2o/dao/ShopDaoTest.java:[18,19] 需要<标识符> [ERROR] /H:/1-慕课就业班/校园商铺V1/o2o_demo/src/test/java/com/imooc/o2o/dao/ShopDaoTest.java:[18,20] 非法的类型开始 [ERROR] /H:/1-慕课就业班/校园商铺V1/o2o_demo/src/test/java/com/imooc/o2o/dao/ShopDaoTest.java:[19,35] 需要<标识符> [ERROR] /H:/1-慕课就业班/校园商铺V1/o2o_demo/src/test/java/com/imooc/o2o/dao/ShopDaoTest.java:[19,36] 非法的类型开始 [ERROR] /H:/1-慕课就业班/校园商铺V1/o2o_demo/src/test/java/com/imooc/o2o/dao/ShopDaoTest.java:[20,21] 需要<标识符> [ERROR] /H:/1-慕课就业班/校园商铺V1/o2o_demo/src/test/java/com/imooc/o2o/dao/ShopDaoTest.java:[20,26] 需要<标识符> [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException Process finished with exit code 1
IDEA总是提示Cannot resolve symbol
2017年09月03日 21:05:08 星际丶牛仔 阅读数 32200
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/ahaha413525642/article/details/77825510
最近在学习Spring,已经导入了所有需要的包,还是一直报Cannot resolve symbol
百度后发现几种方法:
1.File->Invalidate Caches/Restart 清除缓存重启
2.maven -> Reinport、
3.电脑重启
反正我是最后一步才成功的
这些方法都不成功呢!!!
7
收起
正在回答 回答被采纳积分+1
1回答
4. SSM到Spring Boot入门与综合实战
- 参与学习 人
- 提交作业 323 份
- 解答问题 8263 个
本阶段将带你学习主流框架SSM,以及SpringBoot ,打通成为Java工程师的最后一公里!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星