Feed Buzzard
  • General
  • Tech
  • World Tech
  • World Tech Code
  • Wearable Tech
  • Pokemon
  • About Us
    • Terms & Conditions
    • Privacy Policy
  • Contact
No Result
View All Result
  • General
  • Tech
  • World Tech
  • World Tech Code
  • Wearable Tech
  • Pokemon
  • About Us
    • Terms & Conditions
    • Privacy Policy
  • Contact
No Result
View All Result
Feed Buzzard
No Result
View All Result
Home World Tech

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

Gordon James by Gordon James
January 5, 2021
in World Tech
0
0
SHARES
175
VIEWS
Share on FacebookShare on Twitter

Development issue/problem:

I don’t have much experience with Maven in combination with Android, so I followed these instructions to create a new project for Android. After making a project I get the following error message:

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

But I don’t have the src/test/java file in the project. How do you do that? What a great way to set up a project, because I think there’s something missing from these instructions. So, what time does Maven src/test/java appear?

I use Eclipse Juno, m2e 1.1.0, Android configuration for m2e 0.4.2.

How can I solve this problem?

Solution 1:

I understand this too, because the latest update of the m2e-android plugin (version 0.4.2) happens both when you create a new project and when you import an existing project (unless you use src/test/java).

It seems that m2e-android (or maybe m2e) is now always trying to add src/test/java as the source directory in the .classpath file, whether or not it exists in your project directory :

Because it has already been added to the project metadata file, Eclipse complains that the classpathentry is already there when you try to add the source directory via Eclipse:

There are several ways to solve this, the simplest is to manually create the src/test/java directory in the file system and then update the project by pressing F5 and running Maven -> Update Project (right click on the project, Maven -> Update Project…), this should fix the missing source directory: the ‘src/test/java’ error.

Solution 2:

We can change the java file from

  1. Construction Path -> Source.
  2. Click on the Add folder button.
  3. Select the main unit as the container.
  4. Click on the Create folder button.
  5. Enter the folder name as java.
  6. Click on Ready

I’m fine. I’m fine.

Solution 3:

First I solve the problem by creating a folder named src/test/resources, then I rename the folder to src/test/java, then I recreate the folder src/test/resources, it works.

Solution 4:

This may have been caused by the loss of the home directory.

Right click on the src folder -> Change source folder

Solution No 5:

I had the same problem, I solved it.
Create the missing folder directly in the file system (e.g. with Windows Explorer).
And then update your project under the Eclipse.

Solution No 6:

This is a bug in the Android connector for M2E (m2e-android) that has recently been repaired:

https://github.com/rgladwell/m2e-android/commit/2b49 00153cd34fff1cec47fe5aeffabe44d87

This fix has been merged and will be available at the next release. In the meantime, you can test the new patch by installing it from the nearest update site:

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

Solution No 7:

Remove the m2 plugin from the launch plugin list and launch Maven->Update projects on all projects that worked for me.

Note** You do not need to create additional folders to prevent merging when using SVN/Git-based branches.

Solution No 8:

In the case of the Maven project

Try right-clicking on the project and then select Maven -> Update Project….. (Refreshes the project) and then Ok.

Solution No 9:

Select the project -> New -> folder (not the source folder) -> select the project again -> enter the folder name as (src/test/java) -> finished. Here’s how.

If no test source is present, it will be linked automatically. If not, you’ll have to pair it up manually.

Good luck!

Related Tags:

maven source folder eclipse,maven src/main/java package,src/main/resources missing,do not see the src main java and src test java folder in your project structure,cannot nest src/test/java' inside src maven,how to create src/test/resources in eclipse with maven,how to add source folder in eclipse java,test source folder 'src/test/java' in project must have a separate output folder,missing required source folder: 'src main java,eclipse project is missing required source folder: 'src main java,source folder is not a java project error in sts,src/main/java missing intellij,how to create src/test/resources folder,src/main/java missing intellij maven project

Total
0
Shares
Share 0
Tweet 0
Pin it 0
Share 0
Gordon James

Gordon James

James Gordon is a content manager for the website Feedbuzzard. He loves spending time in nature, and his favorite pastime is watching dogs play. He also enjoys watching sunsets, as the colors are always so soothing to him. James loves learning about new technology, and he is excited to be working on a website that covers this topic.

Related Posts

Blockchain Conference in Poland Showcases New Solutions to Problems in Enterprise Logistics
World Tech

Blockchain Conference in Poland Showcases New Solutions to Problems in Enterprise Logistics

December 15, 2022
World Tech

Rockstar Games Brings GTA to The Metaverse

October 20, 2022
World Tech

Ways Technology Is Changing The World Of Education

September 21, 2022
Next Post

Some Key Components You Need To Know About SEO

Are there any advantages of investing in bitcoin?

Why You Should Buy Montblanc Watches

No Result
View All Result

Recommended

Myths and Misconceptions About Joint Pain

Myths and Misconceptions About Joint Pain

6 hours ago
The Spider Veins Facts that Every Individual Ought to Know

The Spider Veins Facts that Every Individual Ought to Know

6 hours ago

5 Benefits of Telehealth That You Should Understand

16 hours ago
openai gpt3 dallmiddotdouglas mit technologyreview

Why GPT-3 is so Impressive – and Why it’s Also Worrying

24 hours ago

Categories

  • Fitness Trackers
  • General
  • Latest
  • Pokemon
  • Tech
  • Technology and Computing
  • Wearable Tech
  • World Tech
  • World Tech Code

Recent Posts

  • Myths and Misconceptions About Joint Pain January 30, 2023
  • The Spider Veins Facts that Every Individual Ought to Know January 30, 2023
  • 5 Benefits of Telehealth That You Should Understand January 30, 2023
  • Why GPT-3 is so Impressive – and Why it’s Also Worrying January 29, 2023

Categories

  • Fitness Trackers
  • General
  • Latest
  • Pokemon
  • Tech
  • Technology and Computing
  • Wearable Tech
  • World Tech
  • World Tech Code

© 2022 FeedBuzzard.com

No Result
View All Result
  • General
  • Tech
  • World Tech
  • World Tech Code
  • Wearable Tech
  • Pokemon
  • About Us
    • Terms & Conditions
    • Privacy Policy
  • Contact

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT