Search code examples
androidandroid-studiosample

How to use downloaded samples in android studio?


I have downloaded samples from SDK Manager . Can any one tell me how to use those samples to create a project in android Studio.

I have tried

Import a android code sample

in the main menu but its asking for download again.

Where will these samples be placed when i downloaded from SDK manager? How can i use it to create a project?


Solution

  • If you can't import the android code sample from android studio, make sure that the path below is not empty :

    path/to/sdk/samples/

    For example you should have android-16, android-19, android-21 folders which contains samples project.

    EDIT 1 : To find your android sdk path from Android studio :

    Go to

    File > Project Structure > SDK Location

    Then you will find your android SDK location.

    Cheers !