java test报错_MapTest.java报错

源自:5-2 学生选课---使用 Map 添加学生

MapTest.java报错

错误:Gradle:执行失败的任务:应用:transformClassesWithDexForDebug。

> com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:过程‘命令’C:\ Program Files \ Java \ jdk1.8.0_73 \ bin \ Java。exe”完成了非零退出值1

运行MapTest.java出现这样的错误如何解决?

public class MapTest {

public Map students;

public MapTest() {

this.students = new HashMap();

}

public void testPut() {

Scanner console = new Scanner(System.in);

for (int i = 0; i < 3; i++) {

System.out.println("请输入学生ID:");

String ID = console.next();

Student st = students.get(ID);

if (st == null) {

System.out.println("请输入学生姓名:");

String name = console.next();

Student newStudent = new Student();

newStudent.getId();

newStudent.getName();

students.put(ID,newStudent);

System.out.println("添加学生:" + students.get(ID).getName());

i++;

}

}

}

public void testKeySet() {

Set KeySet = students.keySet();

for (String stuId : KeySet) {

Student st1 = students.get(stuId);

if (st1 != null) {

System.out.println("学生:" + st1.getName());

}

}

}

public static void main(String[] args){

MapTest mt=new MapTest();

mt.testPut();

mt.testKeySet();

} }

public class Student {

private String name;

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

private String id;

public String getId()

{

return id;

}

public void setId(String id) {

this.id = id;

}

public Set courses;

public Student(){

this.courses=new HashSet();

}

}

提问者:紫金湖人

2016-03-09 02:09

Failed to run command: com.android.tradefed.config.ConfigurationException[OPTION_CONFIGURATION_ERROR|500008|CUSTOMER_ISSUE]: Invalid arguments provided. Unprocessed arguments: [com.google.android.wvts.WidevineAV1PlaybackTests#testL1With240P24UsingExo2Extractor, --include-filter, WvtsDeviceTestCases, com.google.android.wvts.WidevineDashPolicyTests#testL1PlayHDCPV2Required] com.android.tradefed.config.ConfigurationException[OPTION_CONFIGURATION_ERROR|500008|CUSTOMER_ISSUE]: Invalid arguments provided. Unprocessed arguments: [com.google.android.wvts.WidevineAV1PlaybackTests#testL1With240P24UsingExo2Extractor, --include-filter, WvtsDeviceTestCases, com.google.android.wvts.WidevineDashPolicyTests#testL1PlayHDCPV2Required] at com.android.tradefed.config.ConfigurationFactory.createConfigurationFromArgs(ConfigurationFactory.java:567) at com.android.tradefed.command.CommandScheduler.createConfiguration(CommandScheduler.java:1539) at com.android.tradefed.command.CommandScheduler.internalAddCommand(CommandScheduler.java:1595) at com.android.tradefed.command.CommandScheduler.addCommand(CommandScheduler.java:1422) at com.android.tradefed.command.Console$25.run(Console.java:853) at com.android.tradefed.command.Console$25.run(Console.java:836) at com.android.tradefed.command.Console.executeCmdRunnable(Console.java:1085) at com.android.tradefed.command.Console.run(Console.java:1197) at com.android.compatibility.common.tradefed.command.CompatibilityConsole.run(CompatibilityConsole.java:104) 报错
最新发布
07-01
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值