Problems encountered in Android development (v)--eclipse import Android project appears "Invalid project description overlaps the location of the another project" error resolution

Source: Internet
Author: User
<span id="Label3"></p>I. Description of the error<p><p>Manually create an Android project with the following command</p></p><pre><pre><span style="color: #800080;">1</span> -p e:/android/workspace/linearlayouttest-k me.gacl.ui-a mainactivity</pre></pre><p><p>After the command executes, an Android project named Linearlayouttest is created in the E:/android/workspace directory, as shown in:</p></p><p><p>  </p></p><p><p>The E:/android/workspace directory is the working directory of my Eclipse settings</p></p><p><p>Then I import the Linearlayouttest project into eclipse, and the result is the following error:</p></p><pre><pre><span style="color: #000000;"></span><span style="color: #800000;">'</span> <span style="color: #800000;">linearlayouttest</span> <span style="color: #800000;">'</span></pre></pre><p><p>The steps for importing an Android project are as Follows:</p></p><p><p>  </p></p><p><p>  </p></p><p><p>Tried several times not to, delete the project to re-create and re-import or Not.</p></p>Ii. solution to the problem 2.1, solution one: cut the current project to another place, and then import it again to normal import<p><p>Using the "overlaps the location of another project" keyword in Baidu search, did not expect this problem or quite a lot of people encountered, and the reason for this problem is: <span style="color: #ff0000;"> <strong> ADT is to import an Android project that we currently have, and will be placed in the root directory of the current workspace after Import. And the project that we want to import, originally was put to "the root of the current workspace", so it caused the conflict. Find out the problem, then the solution to the problem is very simple, the current project, cut to another place, and then import again, you can normally import. </strong></span></p></p><p><p><span style="color: #000000;">This method can solve the above mentioned problem, this solution is also on-line approach, but I found a new problem, because my project is to use the following command on the cmd command line manually created:</span></p></p><pre><pre><span style="color: #800080;">1</span> -p e:/android/workspace/linearlayouttest-k me.gacl.ui-a mainactivity</pre></pre><p><p>In the above command,-n specifies the name of the project,-t specifies the android platform,-p specifies the project storage path,-k specifies the project package name,-a specifies the activity Name.</p></p><p><p>The project name of my created project is linearlayouttest,activity name is mainactivity, then eclipse will name the project mainactivity when importing the Linearlayouttest Project. Because my activity name is mainactivity, as shown in:</p></p><p><p>  </p></p><p><p>This result is not what I want, so method one is not a good solution.</p></p><span style="color: #000000;"><span style="color: #000000;">2.2, Solution two: Manually create an Android project when the activity name is set to the same as the project name</span></span><p><p>Then I tried another approach, and I created the Android project manually using a command, but when I created the project, the activity name was set to the same name as the project, and the command was as Follows:</p></p><pre><pre><span style="color: #800080;">1</span> -p e:/android/workspace/linearlayouttest-k me.gacl.ui-a linearlayouttest</pre></pre><p><p>Once the above command is complete, it will be in the E:/android/workspace directory (e:/android/workspace directory is the working directory of my Eclipse Settings) Under Create an Android project named linearlayouttest, as shown in:</p></p><p><p>  </p></p><p><p>This time we will import the Linearlayouttest project directly into our eclipse, as shown in the steps to import the Android Project:</p></p><p><p>  </p></p><p><p>  </p></p><p><p>Click the "Finish" button to successfully import the project into eclipse, and the above error will not occur, as shown in:</p></p><p><p>  </p></p><p><p>This workaround is good, when you manually create an Android project with a command, set the activity name to the same as the project name, so that the problem does not occur even if the created project is in the workspace directory where Eclipse works.</p></p><p><p>This is the first time this problem has been met, here is a record of the solution!</p></p><p><p> Problems encountered in Android development (v)--eclipse import Android project appears "Invalid project description overlaps the location of the another project" The wrong solution </p></p></span>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.