How do i open a sample Android SDK app in Eclipse

纵饮孤独 提交于 2019-11-27 18:44:28

Right click in the package explorer window.

Select New -> Other

Under the Android folder select Android Sample Project

Choose the build target and then the sample project

In the new android project window there should be three options:

1.  Create new project in workspace
2.  Create project from existing source
3.  Create project from existing sample

(The third one is a bit hidden, as there is a text box, and check box below the second item before the third one.

Select #3, then select the api level you want the sample for (in the list below), then you can select a sample from the now non-grayed out list.

This is security issue:

  1. Go to you android SDK directory in my case (windows 7, 64 bit) its "C:\Program Files (x86)"
  2. Right click on Android directory and choose 'properties'.
  3. Go to 'security' tab and click on 'Edit'.
  4. Choose Users from the list and tic on 'full control'.
  5. Apply.

1- In Eclipse->Window->Preferences->Android, make sure you have set the SDK Location then Apply and press OK
2- Select File->New->Android Project
3- Click on Create project from existing samples
4- Select the SDK version and select the sample you want

Try this in ADT.

File --> New --> Project.. --> Android Sample Project(Inside Android) --> (Select your build target) and finish. If you installed the sample projects, it will show the list of projects. Select and open.

jadkins4

If you want to import sample projects into Eclipse, do the following:

  1. Click the File menu on the top left of the Eclipse screen.
  2. Select Import.
  3. In the pop-up menu, select Existing Projects into Workspace.
  4. In the next pop-up menu where it says Select root directory, click the Browse button
  5. Browse to the folder where your sample projects are located. Each project should be inside a folder by itself.
  6. Select the folder.
  7. Click the OK button.

If it is a complete project, it will be imported into Eclipe where you can run it, and modify it if needed.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!