如何在 Android Studio 中恢复已删除的 RunConfiguration? [英] How to restore a deleted RunConfiguration in Android Studio?

查看:74
本文介绍了如何在 Android Studio 中恢复已删除的 RunConfiguration?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图处理与测试相关的问题,我遵循了以下建议:https://stackoverflow.com/a/32267762/2576903

I was trying to deal with a testing-related problem and I followed this advice: https://stackoverflow.com/a/32267762/2576903

现在,每当我尝试运行测试时,都会提示我选择一个设备.如何恢复构建配置?

Now whenever I try to run my tests, I get prompted to choose a device. How do I restore that build configuration?

我尝试 git commit 查看更改的文件,但它似乎位于项目文件夹之外的某个地方.我也尝试过使 android studio 的缓存失效,但似乎没有任何效果.

I tried git commit to see changed files, but it seems that it was somewhere outside of the project folder. I also tried invalidating android studio's caches but nothing seems to work.

我尝试自动创建另一个测试类(通过 control + 在常规 POJO 的名称上输入),但未创建配置.

I tried creating another test class automatically (by control + enter on the name of a regular POJO) but the configuration wasnt created.

推荐答案

去了我当前测试类的文件夹,创建了一个新类插入注解 @RunWith(MockitoJUnitTestRunner.class)

Went to the folder of my current test class, created a new class inserted annotation @RunWith(MockitoJUnitTestRunner.class)

右键单击新创建的类的名称 -> Run并创建了配置.

right clicked the newly created class' name -> Run and it created the configuration.

这篇关于如何在 Android Studio 中恢复已删除的 RunConfiguration?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆