The Eclipse development environment is imported into the Android SDK in sample source _android

Source: Internet
Author: User

Beginner Android Programming, the sample code provided in the Android SDK is naturally the best learning material.

The sample code is under the SDK installation directory (X:\Android\android-sdk\samples). But I got into some trouble when I was importing with the Eclipse development environment. See someone on the internet was resolved by "file-> Import ..." or "File-> new->project-> Create Project from Existing Code", but I tried, and there was a problem. The latter method can be imported successfully, but the project is not copied to Eclipse's working directory (X:\Eclipse\workspace), which, as the practice changes, affects the original sample code, may lose reference, Also, the original SDK's sample directory attribute is changed from read-only to writable.

After a while, I found that Eclipse has provided a convenient way to import. That's "File-> new->project-> Android simple Project." Below is the operation screenshot, a look is clear, very simple.

----------------------------

---------------------

Select the version of sample you want.

Choose the type of sample you need to study, Apidemos is the most basic, very suitable for beginners. Press "Finish" to finish it.

If you've already installed it, you don't have to worry about doing it incorrectly.


When compiling the runtime, note that the emulator already contains the Apidemos application, which causes the following error message. Need to execute prompt under SDK installation directory (X:\Android\android-sdk\platform-tools) to command "ADB uninstall Com.example.android.apis" To uninstall the original Apidemos application first.

Our changes are then successfully displayed in the newly compiled application, such as adding your own ID to the timer.


Related Article

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.