报错解决
文件错误
建立文件时建错了,文件格式错误,粘贴完文件后报一堆错
此时重新建立项目。
项目启动失败
./gradlew build
在idea终端输入时报错
Exception in thread "main" java.lang.RuntimeException: Timeout of 120000 reached waiting for exclusive access to file: 文件路径
此时清理清除 Gradle 的缓存文件夹
rm -rf ~/.gradle/caches/
2rm -rf ~/.gradle/wrapper/
之后再重新运行
属性键重复
在配置asset-app/src/test/resources/log4j.properties
时,若文档的那个配置信息报错则用下面的这个
# Set the root logger level and appenders
log4j.rootLogger=DEBUG, file, stdout
# File appender configuration
log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
log4j.appender.file.File=./log/sdk.log
log4j.appender.file.Append=true
log4j.appender.file.DatePattern='_'yyyyMMddHH'.log'
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=[%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C{1}.%M(%L) | %m%n
# Console appender configuration
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C{1}.%M(%L) | %m%n
标签:layout,stdout,appender,报错,file,解决,log4j
From: https://www.cnblogs.com/hunshuideyunxue/p/18355843