How to deal with missing src/test/java source fold

2019-01-21 19:03发布

I'm not very experienced with Maven in combination with Android yet, so I followed these instructions to make a new Android project. When the project has been created, I get the following error message:

Project 'xxx-1.0-SNAPSHOT' is missing required source folder: 'src/test/java'

When I try to add a new source folder with New->Other->Java-Source Folder with src/test/java, I get another error message:

The folder is already a source folder.

But I don't have any src/test/java folder in my project. How should I deal with that? What's the clean way to setup the project, because I assume that there is something missing in this instruction. So what is the Maven way to let src/test/java appear?

I'm using Eclipse Juno, m2e 1.1.0, Android Configuration for m2e 0.4.2.

7条回答
Root(大扎)
2楼-- · 2019-01-21 19:22

This is a bug in the Android Connector for M2E (m2e-android) that was recently fixed:

https://github.com/rgladwell/m2e-android/commit/2b490f900153cd34fff1cec47fe5aeffabe44d87

This fix has been merged and will be available with the next release. In the meantime you can test the new fix by installing from the following update site:

http://rgladwell.github.com/m2e-android/updates/master/

查看更多
登录 后发表回答