How do i open a sample Android SDK app in Eclipse
Solution 1
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
Solution 2
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.
Solution 3
This is security issue:
- Go to you android SDK directory in my case (windows 7, 64 bit) its "C:\Program Files (x86)"
- Right click on Android directory and choose 'properties'.
- Go to 'security' tab and click on 'Edit'.
- Choose Users from the list and tic on 'full control'.
- Apply.
Solution 4
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
Admin
Updated on July 09, 2022Comments
-
Admin almost 2 years
I have created a basic program in Eclipse for Android 2.1. then I wanted to look at some of the samples, and import sample projects which are in the SDK directory. I have tried opening a new project and 'create project from existing source', I browse and can select a project, all the details come up and I can click finish, but I receive an error message saying 'could not write file', and if I click on details, it says "access is denied" I have tried copying a project folder into my own workspace but it still does the same thing.
-
Jackson Walters almost 12 yearsYou get all kinds of errors if you try and do a normal import so this solves a ton of headaches. Surprised I haven't seen this before, thanks!