-1

I have just started using Android Studio to learn app development.

I am attempting to run an existing complete android project on github on my android device. The project contains a 'res' and 'src' folder which contains multiple .java files for the application. Other files include github relevant files like the .project, .gitignore, readme etc How can I convert these files into a .apk file that can be run on my device?

2 Answers2

1
 1) Connect your device to laptop/desktop using usb cable
 2) Enable virtual debugging in your device in developer tools.
 3) Configure your device in AVD[i.e mobile] in android studio.
 4) Once you connect your device and build and click on run in android studio it will create directly apk in your mobile only.

Refer :https://developer.android.com/training/basics/firstapp/running-app.html

This link will help to configure virtual device.

Pradeep
  • 1,947
  • 3
  • 22
  • 45
  • I have gone through the basic steps listed above. However, when I open the cloned master from github on Android studio the option to 'Run' is grayed out. When I click Run all I get it is an 'Edit Configurations' Window. When I do Build -> Make Module on the main project folder, I get an Andriod Source error: Can't find bundle for base name messages... – Aakash Gupta Oct 11 '17 at 14:30
  • I think you need to clone from proper branch and ensure that post cloning all the files are in place.If you forward the github public url I will try it out and suggest you – Pradeep Oct 12 '17 at 07:34
  • To start with I suggest your to create a basic Hello World application and run the above steps on it so that your out put will display "Hello World" in your device.This is basic exercise you can do before going to a big application .Even you can ignore github concept for Hello World.When you want to work on big applications /POC then you can concentrate on Github code. – Pradeep Oct 12 '17 at 07:48
0

Go to your Android Studio and at the top toolbar you will see tab "Build". Then select "Build apk"

Build->Build apk

Yunus Kulyyev
  • 1,022
  • 15
  • 26