English 中文(简体)
简讯:演播室 任务试验 项目中没有的班级
原标题:Android Studio: Task testClasses not found in project

I finally have a Test Case setup for Roboelectric but when I try to run it from Android Studio, get this error: Task testClasses not found in project myExternalProjectName

rror: 不得使用建筑施工 逐步安装 C.UsersMike.gradlewrapperdistsgradle-2.2.1-allc64ydeuardnfqctvr1gm30w53gradle-2.2.1 。

NOTES: 1. When I run from gradle cmd line(gradlew build) the tests run fine 2. I M USING : org.robolectric:robolectric:3.0

我的项目中有作为AAR的单元。 我如何处理这个问题?

问题回答

I just had this error after setting up signing configs. File -> invalidate caches -> invalidate and restart resolved the issue for me.

绕过这一错误,请在下文中添加行文。 梯度

task("testClasses")

这一错误发生在我重建该项目时,这是来自科特林多普顿式粉碎/图书馆的。 仍然不知道实际错误原因。

先拆除所有测试组合,然后从测试包中测试。

步骤:

  • step 1.- Go to Run/Debug configuration
  • step 2.- Remove All test configuration file with selecting config and press (-)
  • step 3.- Press Apply and OK
  • step 4.- Run the test again

页: 1 面对安乐施会的测试Classes hiccup,它常常是一家与Gradle有关的天线。 你们是否在安乐施室里尝试了格拉斯语的合成材料? 有时,好评是trick。 此外,确保你的罗伯尔文版与你的格列环境一致。 如果其他所有因素都失败,清洁和重建可以节省时间。





相关问题
C++/CLI : How to override Equal method of Object class

I am a newbie to C++/CLI and is having some problems trying to override the Equal method of the base Object class. I get the following compilation warning error for the following code. How should this ...

处理多重定义错误[封闭]

I m试图汇编一些C++文档。 • 在连接阶段(汇编工作)发现以下几类错误:

What s causing this error in a subclass of MKAnnotationView?

I m trying to create a subclass of MKAnnotationView for an iPhone Mapkit app, but for some reason I am suddenly encountering this error: Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/...

iphlpapi / ifdef.h

I m trying to use iphlpapi (GetAdapterInfo) and am having trouble compiling the code. I have iphlpapi.h from SDK 7 and have added the appropriate path to the include files in visual studio. I get ...

was not declared in this scope C++

Why do I get this error in the code below? class ST : public Instruction{ public: ST (string _name, int _value):Instruction(_name,_value){} void execute(int[]& anArr, int aVal){ //...

Adding an include guard breaks the build

I added #ifndef..#define..#endif to a file of my project and the compiler fails. As soon as I remove it or put any other name in the define it compiles fine. What could be the problem? Sounds like ...

<list> retreving items problem with iterator

I have a list of type Instruction*. Instruction is a class that I made. This class has a function called execute(). I create a list of Instruction* list<Instruction*> instList; I create an ...

热门标签