How to deal with missing src/test/java source folder in Android/Maven project?

前端 未结 9 2259
梦如初夏
梦如初夏 2020-12-13 06:15

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 ge

相关标签:
9条回答
  • 2020-12-13 06:45

    I solve the problem by creating a folder named "src/test/resources" first, then i rename the folder to "src/test/java" ,finally create a "src/test/resources" folder again .It works .

    0 讨论(0)
  • In the case of Maven project

    Try right click on the project then select Maven -> Update Project... then Ok

    0 讨论(0)
  • 2020-12-13 06:49

    Select project -> New -> Folder (not source folder) -> Select the project again -> Enter the folder name as (src/test/java) -> finish. That's it.

    If the test source is missing, it would link it automatically. If not, then require to link it manually.

    0 讨论(0)
  • 2020-12-13 06:56

    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/

    0 讨论(0)
  • 2020-12-13 06:56

    Removing the m2 plugin from startup-up plugin's list and doing a Maven->Update Projects on all the projects worked for me.

    Note** One should not create additional folders to avoid merging them while using SVN/Git based branches.

    0 讨论(0)
  • 2020-12-13 07:02

    I had the same issue, fixed it. Create the missing folder directly in your file system (Using windows explorer for example) . And then, refresh your project under eclipse.

    0 讨论(0)
提交回复
热议问题