AS莫名报错 Error:Could not download junit.jar (junit:junit:4.12): No cached version available

本文介绍了解决Gradle构建工具中因offlinework选项导致的问题的方法。通过调整设置并执行清理项目操作,可以有效解决依赖更新不及时等问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在网上百度的方法,亲测可用,特来记录

找到File - Other settings - Default settings

Build Tools - Gradle

去掉"offline work"选项勾

点击 "Ok"

去到 "Build" - "clean Project"

 

 

参考网址:https://blog.youkuaiyun.com/qq_33210042/article/details/78191231

转载于:https://www.cnblogs.com/xy-milu/p/9633367.html

2025-07-01 15:17:22,311 INFO o.j.r.JARSourceHTTP: Found cached repo 2025-07-01 15:17:22,536 INFO o.j.r.PluginManager: Plugins Status: [jpgc-plugins-manager=1.11, jmeter-core=5.6.3, jmeter-ftp=5.6.3, jmeter-http=5.6.3, jmeter-jdbc=5.6.3, jmeter-jms=5.6.3, jmeter-junit=5.6.3, jmeter-java=5.6.3, jmeter-ldap=5.6.3, jmeter-mail=5.6.3, jmeter-mongodb=5.6.3, jmeter-native=5.6.3, jmeter-tcp=5.6.3, jmeter-components=5.6.3] 2025-07-01 15:17:32,191 INFO o.a.j.s.FileServer: Default base='D:\日常软件\H.Jmeter\apache-jmeter-5.6.3\bin' 2025-07-01 15:17:32,193 INFO o.a.j.g.a.Load: Loading file: D:\日常软件\H.Jmeter\查看结果树.jmx 2025-07-01 15:17:32,193 INFO o.a.j.s.FileServer: Set new base='D:\日常软件\H.Jmeter' 2025-07-01 15:17:32,240 INFO o.a.j.s.SaveService: Testplan (JMX) version: 2.2. Testlog (JTL) version: 2.2 2025-07-01 15:17:32,240 INFO o.a.j.s.SaveService: Using SaveService properties file encoding UTF-8 2025-07-01 15:17:32,240 INFO o.a.j.s.SaveService: Using SaveService properties version 5.0 2025-07-01 15:17:32,256 INFO o.a.j.s.SaveService: Loading file: D:\日常软件\H.Jmeter\查看结果树.jmx 2025-07-01 15:17:32,319 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/html is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser 2025-07-01 15:17:32,319 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xhtml+xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser 2025-07-01 15:17:32,319 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser 2025-07-01 15:17:32,319 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser 2025-07-01 15:17:32,319 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser 2025-07-01 15:17:32,319 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/css is org.apache.jmeter.protocol.http.parser.CssParser 2025-07-01 15:17:32,557 INFO o.a.j.s.SampleResult: Note: Sample TimeStamps are START times 2025-07-01 15:17:32,557 INFO o.a.j.s.SampleResult: sampleresult.default.encoding is set to UTF-8 2025-07-01 15:17:32,557 INFO o.a.j.s.SampleResult: sampleresult.useNanoTime=true 2025-07-01 15:17:32,557 INFO o.a.j.s.SampleResult: sampleresult.nanoThreadSleep=5000 2025-07-01 15:17:32,636 INFO o.a.j.r.ClassFinder: Will scan jar D:\日常软件\H.Jmeter\apache-jmeter-5.6.3\lib\ext\jmeter-plugins-manager-1.11.jar with filter ExtendsClassFilter [parents=[interface org.apache.jmeter.visualizers.ResultRenderer], inner=false, contains=null, notContains=null]. Consider exposing JMeter plugins via META-INF/services, and add JMeter-Skip-Class-Scanning=true manifest attribute so JMeter can skip classfile scanning 2025-07-01 15:17:32,636 INFO o.a.j.r.ClassFinder: Will scan jar D:\日常软件\H.Jmeter\apache-jmeter-5.6.3\lib\ext\jmeter-plugins-manager-1.11.jar with filter ExtendsClassFilter [parents=[interface org.apache.jmeter.visualizers.RequestView], inner=false, contains=null, notContains=null]. Consider exposing JMeter plugins via META-INF/services, and add JMeter-Skip-Class-Scanning=true manifest attribute so JMeter can skip classfile scanning 2025-07-01 15:17:32,668 INFO o.a.j.s.FileServer: Set new base='D:\日常软件\H.Jmeter' 2025-07-01 15:17:37,105 INFO o.a.j.e.StandardJMeterEngine: Running the test! 2025-07-01 15:17:37,105 INFO o.a.j.s.SampleEvent: List of sample_variables: [] 2025-07-01 15:17:37,105 INFO o.a.j.s.SampleEvent: List of sample_variables: [] 2025-07-01 15:17:37,105 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must contain the string: '.functions.' 2025-07-01 15:17:37,105 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must not contain the string: '.gui.' 2025-07-01 15:17:37,254 INFO o.a.j.r.ClassFinder: Will scan jar D:\日常软件\H.Jmeter\apache-jmeter-5.6.3\lib\ext\jmeter-plugins-manager-1.11.jar with filter ExtendsClassFilter [parents=[interface org.apache.jmeter.functions.Function], inner=false, contains=null, notContains=null]. Consider exposing JMeter plugins via META-INF/services, and add JMeter-Skip-Class-Scanning=true manifest attribute so JMeter can skip classfile scanning 2025-07-01 15:17:37,254 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*) 2025-07-01 15:17:37,254 INFO o.a.j.e.StandardJMeterEngine: Starting setUp thread groups 2025-07-01 15:17:37,254 INFO o.a.j.e.StandardJMeterEngine: Starting setUp ThreadGroup: 1 : tbd 线程组 2025-07-01 15:17:37,254 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group tbd 线程组. 2025-07-01 15:17:37,254 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error 2025-07-01 15:17:37,254 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 delayedStart=false 2025-07-01 15:17:37,270 INFO o.a.j.t.ThreadGroup: Started thread group number 1 2025-07-01 15:17:37,270 INFO o.a.j.e.StandardJMeterEngine: Waiting for all setup thread groups to exit 2025-07-01 15:17:37,270 INFO o.a.j.t.JMeterThread: Thread started: tbd 线程组 1-1 2025-07-01 15:17:37,270 INFO o.a.j.p.h.s.HTTPHCAbstractImpl: Local host = jizhi 2025-07-01 15:17:37,285 INFO o.a.j.p.h.s.HTTPHC4Impl: HTTP request retry count = 0 2025-07-01 15:17:37,424 ERROR o.a.j.u.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: ``// JSR223 Sampler 中使用 import org.apache.http.client.methods.HttpPost; import org . . . '' : Typed variable declaration : Object constructor 2025-07-01 15:17:37,424 WARN o.a.j.e.BeanShellPostProcessor: Problem in BeanShell script: org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of: ``// JSR223 Sampler 中使用 import org.apache.http.client.methods.HttpPost; import org . . . '' : Typed variable declaration : Object constructor 2025-07-01 15:17:37,460 INFO o.a.j.t.JMeterThread: Thread is done: tbd 线程组 1-1 2025-07-01 15:17:37,460 INFO o.a.j.t.JMeterThread: Thread finished: tbd 线程组 1-1 2025-07-01 15:17:37,475 INFO o.a.j.e.StandardJMeterEngine: All Setup Threads have ended 2025-07-01 15:17:37,539 INFO o.a.j.e.StandardJMeterEngine: No enabled thread groups found 2025-07-01 15:17:37,539 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test 2025-07-01 15:17:37,539 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)
最新发布
07-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值