当前位置:网站首页>[optional: run your application on mobile device]
[optional: run your application on mobile device]
2022-07-22 12:12:00 【Cold drunken spring】
Last one :【 Create and run your first Android application 】
One 、 preparation
Prerequisite
- Basically know how to use Android Studio.
- Can open and adjust Android Settings on the device .
Learning content
- How to set up Android The device passes Android Studio Run the application .
- How to be in Android Studio Connecting entities in Android Device and run the application .
Conditions required
- Downloaded and installed on your computer Android Studio.
- Already in Android Studio Set an application project in .
- a Android equipment ( Such as mobile phone or tablet ).
- One can pass USB The port will Android The device is connected to the computer USB Line .
Be careful : If reference information is needed to help identify computers and Android Equipment equipped USB Port type and required supporting data cable , Please visit https://en.wikipedia.org/wiki/USB.
Two 、 Turn on USB Debugging function
If you want to let Android Studio With your Android Device communication , You must be on the Developer options Enable... In settings USB Debugging function .
To display developer options and enable USB Debugging function , Please follow the steps below :
- stay Android On the device Set up , And then the search About mobile phone .
- Click About mobile phone , Then click Version number Seven times . If there is a hint , Enter your device password or PIN code .
- return Set up , Then click System .
Developer options It should now appear in the list . You may need to open senior Option to find the option .
- Click Developer options , Then open USB debugging .
3、 ... and 、 install Google USB The driver ( Only applicable to Windows)
If your Android Studio Is installed in Windows On computer , You must install USB Device driver , Then you can run your application on the physical device .
Be careful : about Ubuntu Linux, Please follow Running applications on hardware devices Instructions in the document .
- stay Android Studio in , In turn, click Tools > SDK Manager.
The system displays Settings for New Projects window .
- Click on SDK Tools TAB .
- Choose Google USB Driver, And then click OK.
After completion , The driver file will be downloaded to android_sdk\extras\google\usb_driver Directory . Now? , You should be able to connect the device and from Android Studio Run your app .
Four 、 stay Android Run your application on the device ( For all operating systems )
Now? , You can connect the device and from Android Studio Run the application .
- Use USB The line will Android The device is connected to the development machine . A dialog box should be displayed on the device , You are required to allow USB debugging .
- Choose All allowed Option to remember this computer . Click determine .
- At the computer Android Studio In the toolbar , Click on Run Button .
The system will open Select Deployment Target Dialog box , It lists the available simulators and connected devices . The system should list your physical devices and all simulators .
Be careful : about Android Studio 3.6 And higher , After connecting the physical equipment with debugging function turned on , The system will automatically select the corresponding equipment .
- Select your device , And then click OK.
Android Studio The application will be installed and run on the device .
Be careful : If your device is running Android Platform not in Android Studio Install in , The system may display a message , Ask if you want to install the required platform . Click on Install and Continue, Then click Finish.
5、 ... and 、 Troubleshoot problems
If your computer is running Linux or Windows, You may need to perform additional steps , Only in the entity Android Run your application on the device . see Run the application document on the hardware device .
stay Windows On , You may need to install the appropriate USB The driver . see also Original equipment manufacturer (OEM) USB The driver .
If Android Studio Your device is not recognized , Please try the following :
pull out USB Line , And then plug it in again .
restart Android Studio.
If your computer still cannot find the device or claim the device “ unaccredited ”, Please follow the steps below :pull out USB Line .
On the device Set up Open in Developer options .
Click undo USB Commissioning Authorization .
Reconnect the device to the computer .
When prompted by the system , grant USB Commissioning Authorization .
6、 ... and 、 Learn more
边栏推荐
- Application of SCA on devsecops platform
- Opérations de déclaration des défauts
- [STL]vector模拟实现
- The wave of the meta universe is shocking. Seize the opportunity and work together
- FTP service
- 第01篇:分布式注册中心
- EN 1504-4: structural bonding of concrete structure products - CE certification
- 【MySQL】20-MySQL如何创建和管理表超详细汇总
- Application of 3D simulation and visual display in industrial plant
- Pyqt5 makes an exquisite video player * with source code
猜你喜欢
For() loop and quadratic for nesting of loop structure
关于目前流行的 Redis 可视化管理工具的详细评测
From the 5K monthly salary of Tencent outsourcing to the 15K monthly salary of transferred regular employees, who can understand the 168 days of sadness
windows服务器安全设置怎样操作,要注意什么?
Decentralized edge rendering metauniverse protocol how cadeus detonates metaverse summit 2022
LSA type, OSPF optimization and topology configuration
Machine learning Basics (4) filters
What is a single page application
How to integrate timed batch tasks gracefully (glory Collection Edition)
How does MySQL data 900w+ achieve from 17s to 300ms? Charm of SQL optimization (glory Collection Edition)
随机推荐
Virtual machine dual network card configuration
Detailed evaluation of current popular redis visual management tools
Invasion investigation of HVV blue team
Oracle 创建高级连接
White whoring 1000 interview questions, you can face it after reading it
Interface document evolution atlas, some ancient interface document tools, you may not have used them
【 可选:在移动设备上运行您的应用】
Pyqt5 makes an exquisite video player * with source code
How to operate the security settings of windows server and what to pay attention to?
GaitSet源代码解读(三)
第02篇:分布式负载均衡
SSM项目整合【详细】
An open source template that can generate a free personal blog in only three steps: vdoing template
[stl]vector Simulation Implementation
Real time joint simulation of smart grid hardware based on FPGA Jetson
LeetCode:814. Binary tree pruning [recursion]
机器学习基础篇(5)之形态学
6. User defined model construction and use of paddlepaddle
一个仅需三步配置就能生成免费个人博客的开源模板:vdoing-template
As a test, how to effectively communicate with unreasonable developers