Import existing Android Studio Project and view "Storyboard" - android

I am a long time iOS developer but brand new to Android development and am trying to import an already built Android app into Android Studio, the problems I am running into are
1) What is the right way to import this Android project I downloaded off the internet
2) What file in this project should I select to view the "Storyboard" of this application
Below is a screenshot of the file explorer from this project, I am currently inside of the folder called "My Project".

You have 2 options to import an existing Android project into AS:
Select the Import project (Eclipse ADT, Gradle, etc...), shown in the below image. Even though you know it's an Android Studio project, you should still try to import it this way, because sometimes the generated files are not customized for the environment.
Select File -> New -> Import Project. As shown in the image below.
The equivalent of the storyboards in Android are the XML layouts, which you can found under the res folder on the Android View in AS.

in AndroidStudio File->Open > Select root folder of the project.
Layouts are the storyboard for android.It's inside the app/src/main/res/layout directory.

Related

How to run google sample?

I have downloaded a sample from this page. How can I run it in my android studio? Do I need to create a project or what?
You have to create a blank project using Android Studio or Eclipse with Android Bundle. After that you have to copy all java files from archive to your project in the src folder (keep the same structure), the resources (res folder) and replace the AndroidManifest.xml file with the one from archive.
To import a project to Android Studio:
Start Android Studio and close any open Android Studio projects.
From the Android Studio menu select File > New > Import Project.
Select the destination folder and click Next.
Select the import options and click Finish.
for more info:
http://developer.android.com/sdk/installing/migrate.html

Android Studio, Sample Code - Not working

There is sample code on the developer site that i wish to run.
When I import as a new Android Studio project, I'm not given any ability to run the code (disabled buttons).
I attempted to copy the source files over into the shell of a new project, but i than got errors that didn't make sense. reference to duplicate declarations in source files that had nothing relating inside them.
Is there an idiots guide on how to properly use android studio, or is it just this difficult?
In order to correctly import the project, you should follow the Samples guide as found in the developer docs.
To import a downloaded project:
Unpack the downloaded project package.
In Android Studio, chose File >
Import Project and select the root folder of the unpacked project.
Android Studio may ask you to choose the type of project you are
importing.
If this is the case, make sure to choose Import project
from external model and select the Gradle option.
Alternatively, if the Gradle option does not work, I would attempt to use the Eclipse option.
Open .gradle file when you import the project, not the folder of the proyect.

How to import external project folder in Android studio?

This question might look very silly to many. But i could not get answer from anywhere in google. I downloaded a eclipse project and tried to import it in Android Studio. The downloaded zip file has two folder like this.
Now how do i import them as a single project? Help me
This the project i like to import
http://www.java2s.com/Open-Source/Android_Free_Code/Game_Card/Download_Free_code_Ace_It.htm
Just open Android Studio > Import Non-Android Studio Projects > Select your ADT project folder.
It creates a new AS-version of your project, and reports items that need your manual verification.
Try this :
Android Studio > Import Project > Choose the Card Game folder (not the master folder) > Click next > check all boxes Click finish

Import the android music application into an Eclipse workpace

I downloaded android music sources to learn from. Essentially, I want to explore it in Eclipse. I've tried importing android project - it doesn't seem to find any projects in the folder which obviously contains one. When I had tried to new project with existing source it said The application name is shown in the PlayStore, as well in the Manage Application list in Settings.
Any suggestions ?
The project exists, but it is not an Eclipse project. you shouldn't import it, you should do :
New project > Android > Android project from from existing code and point to your folder

Importing android source code as a project in eclipse

I have downloaded an android sample called custom view from android refernce from this location
http://developer.android.com/shareables/training/CustomView.zip
It only has the java files and other resources but does not contain any project file for me to import in eclipse as a project.
So when I import existing project into workspace, eclipse does not pick the project in the import dialog.
How can I import it into eclipse ? I have ADT tools installed already,
Thanks,
Ahmed
Maybe that's because you'll have to make the manifest.xml file.
What I'd suggest, is to create a new Android project, with the same package and Activity's name than in your zip (ie com.example.android.customviews and MainActivity), then copy/paste the files from your zip to the new project directory (thus replacingsrcandres` folders). That way, Eclipse will generate the manifest for you, with correct reference.
This should not take more than 30 seconds...
Go to Project Explorer and right click -> Import -> Select Android -> Existing Android Code Into Workspace -> browse to folder with your code -> finish
I encountered the same problem. I did thought that it's missing the AndroidManifest.xml file. I tried to fixed it and place it here. You can download it an try.

Categories

Resources