[JAVA] Until you start developing android apps on mac

table of contents

  1. Introduction
  2. Install Android Studio
  3. Create a project
  4. Execution using the actual machine
  5. Remedy for "Error running'app': No target device found."
  6. Conclusion

0. Introduction

Suddenly I decided to make an Android application and tried it, but I stumbled, so I will keep a record of it. The language is "Java". Since my smartphone is usually Android, I will use the actual device in the test.

1. Install Android Studio

In order to develop an Android application, you first need to install "Android Studio" provided by Google. Please download from the following site. http://developer.android.com/sdk/index.html

When you start it, you will be asked if you want to use the previous version, "Import Studio settings from:", so select "Do not import settings".

When "Welcome Android Studio" appears, select "Next"

Select "Install Type". I chose "Standard" because it was my first time.

Select "UI Theme". (You can choose either one)

In "Verify Settings", check the contents and select "Finish".

When all is completed, the top screen is displayed. top画面

2. Create a project

Select "Start a new Android Studio project" on the top screen.

Select "Empty Activity" in "Choose your project". project

Decide the name etc. in "Configure your project". Name-> Decide on a name for the project and enter it. Package name-> This time it's a test, so it's as it is Save location-> Save project location Language-> Select a development language. This time, select "Java". Minimum SDK-> Select "API 16: Android 4.1 (Jelly Bean)" this time. Configure your project

3. Execution using the actual machine

First, do some operations on your Android device.

Open [About device] in the settings and tap [Build number] 7 times.

Go back to the settings and select [Developer Options].

Turn it "ON".

Turn on USB Debugging. setting

Connect the actual machine and the personal computer with a cable.

When you're done, go back to Android Studio and click the green triangle to run it. green

Success if "Hello World!" Is displayed on the screen of the actual machine! hello world

4. Remedy for "Error running'app': No target device found."

When I first executed it, I got the error "Error running'app': No target device found.", So I will write down the corrective action that I actually took.

In my case, there was a problem with the cable I was using. There was a cable that had only the function to charge the smartphone, and because I was using it, it was not recognized as a "media device" and an error occurred. Also be aware of the cables you use when doing this.

5. Conclusion

This time it ends. I stumbled upon Error running'app': No target device found. No way, the cause was the cable. .. ..

Recommended Posts

Until you start developing android apps on mac
Until you start nginx on CentOS using Docker on Mac OS
[Android] Let's snoop on other people's apps
Until you run CuPy (v11.1) on Ubuntu 20.04
Until you run apache on ubuntu on docker
Ssh to Ubuntu on VirtualBox on your Mac and do it until you install Docker
When Kubernetes doesn't start on Docker Desktop for Mac
Step notes until JUnit 5 works on Mac + IntelliJ IDEA
Until you publish the app on the App Store by yourself
[2018 Preservation Version] Reverse Engineering Android App (.apk) on Mac
What to see when IntelliJ doesn't start on Mac
Until you start development with Spring Boot in eclipse 1
Until building Spring-Boot using Eclipse on Mac (Gradle version)
Until you start development with Spring Boot in eclipse 2
Until the Google Assistant sample runs on Android Things