android studio 2.3 instant run,android studio 2.3 instant run not working

可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):

问题:

I have updated android studio from 2.2 to 2.3,then I found Instant run not working.

Error while executing: am startservice com.example.codingmaster.testcc/com.android.tools.fd.runtime.InstantRunService

Starting service: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.codingmaster.testcc/com.android.tools.fd.runtime.InstantRunService }

Error: Not found; no service started.

I also try reinstall android studio 2.3 but not work.

回答1:

In case you are running a device with MIUI, go to Developer Settings > Turn on MIUI optimization and turn it off.

You will then need to restart your device and recompile the code.

Instant Run should then work again

回答2:

Found a solution. You have to enable auto-start support for other device manufacturers (example ASUS, LeEco and some others).

For LeEco -

Install the app with Instant Run. It should fail (If it doesn't, why are you reading this in the first place?)

Go to Settings.

Look for Permissions under Personal.

Choose "You have allowed X apps to autolaunch". Toggle ON.

Done! Instant Run works.

For ASUS, give that app Auto-Start permission with Auto Start Manager. See here for more information.

For other devices, please find some similar setting.

EDIT -

If you have disabled auto-start in the Purify (or other similar app), please re-enable it.

Source - https://code.google.com/p/android/issues/detail?id=235879

回答3:

I was facing to the same issue too with an Asus phone.

Error while executing: am startservice com.eyelights.android/com.android.tools.fd.runtime.InstantRunService

Starting service: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.myapp.android/com.android.tools.fd.runtime.InstantRunService }

Error: Not found; no service started.

Thanks to this post, i was able to start my app again :

https://code.google.com/p/android/issues/detail?id=235879

Go in Android Studio Preferences :

6c1555302777729326ca3efa0910d9ec.png

Disable Instant Run like this :

6c1555302777729326ca3efa0910d9ec.png

Now you can run your app again. Don't forget to enable again Instant run when you switch phone.

It's not the perfect solution, but it's working

$ adb shell am start -n "com.myapp.android/com.myapp.android.activity.SplashScreenActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER

Connected to process 16367 on device asus-asus_z00ed-F9AZCY208273

回答4:

6c1555302777729326ca3efa0910d9ec.png

from 2.3 There is new icon.

see this.

回答5:

If you're using an Asus Zenfone, make sure that the Auto Start Manager doesn't block your app from running.

回答6:

Goto File-settings, "Build, Execution, Deployment"

click on instantRun

Uncheck Enable instant run Checkbox

then apply and ok will solve your problem

回答7:

disable instant run. This bug in issue tracker: https://code.google.com/p/android/issues/detail?id=235879

回答8:

Instant Run Documentation:

To start using Instant Run, you also need to change the build variant to a debug version of your app and deploy it to a target device running Android 5.0 (API level 21) or higher. To learn about more techniques that speed up your build, read Optimize Your Build Speed

so make sure your build variant is set to 'debug'.

回答9:

If you are using Genymotion with ARM Translation, you need to create a new image without it installed, and Instant Run will work fine.

回答10:

You need to update your gradle first then after instant run work..

To take advantage of all the latest features (such as Instant Run), improvements and security fixes, we strongly recommend that you update the Android Gradle plugin to version 2.3.0 and Gradle to version 3.3.

Thanks

回答11:

I had same problem by using Android Studio 2.3.2 and solved the issue by adding these codes in gradle file.

defaultConfig {

...

minSdkVersion 15

targetSdkVersion 25

...

// Enabling multidex support.

multiDexEnabled true

}

dependencies {

compile 'com.android.support:multidex:1.0.0'

}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/502399.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

和catch的区别_BIO、NIO、AIO 的区别是什么?

BIO、NIO、AIO 的区别是什么?同/异步、阻/非阻塞的区别是什么?文件读写最优雅的实现方式是什么?NIO 如何实现多路复用功能?带着以上这几个问题,跟着芒果一起进入IO的世界吧。在开始之前,我们先来思考一个问…

302状态码_HTTP协议详解(基础概念 方法 状态码 首部 连接 Cookie 新特性 安全)

一 、基础概念URIURI 包含 URL 和 URN。请求和响应报文1. 请求报文2. 响应报文二、HTTP 方法客户端发送的 请求报文 第一行为请求行,包含了方法字段。GET获取资源当前网络请求中,绝大部分使用的是 GET 方法。HEAD获取报文首部和 GET 方法类似&#xff0c…

flask get 参数_用它 5 分钟以后,我放弃用了四年的 Flask

“ 阅读本文大概需要 3 分钟。 ”有一个非常简单的需求:编写一个 HTTP 接口,使用 POST 方式发送一个 JSON 字符串,接口里面读取发送上来的参数,对其中某个参数进行处理,并返回。如果我们使用 Flask 来开发这个接口&…

傲梦python笔试题_python笔试题

冒泡排序的原理:每次对相邻的两个元素进行比较,若前者大于后者,这将两者的位置交换。第一轮就可以将最大的元素置于列表的最后。几轮循环 冒泡排序的前提条件:有序的列表 import unittest # 冒泡排序 def bubble_sort(arr): for i…

python pexpect pxssh scp_python Pexpect 实现输密码 scp 拷贝的方法

在服务器A上的程序用到服务器B上的文件data,并且需要定期更新文件。 但是直接在bash文件中使用scp -P 1000 192.168.199.10:/temp/data /temp由于权限限制,不能免ssh密码拷贝,会要求输入B机器的密码。本想直接在bash文件中使用Pexpect 来实现…

python的类方法_python 类不实例化,调用类方法:@staticmethod 和 @classmethod

staticmethod 和 classmethod 用法 一般来说,要使用某个类的方法,需要先实例化一个对象再调用方法。 而使用staticmethod或classmethod,就可以不需要实例化,直接类名.方法名()来调用。 这有利于组织代码,把某些应该属于…

android sse 人脸识别,基于Android Camera2之openCamera 流程

简介frameworks\base\core\java\android\hardware\camera2Camera2在Android 5.0上首次出现,主要重新定义了一套Camera 的使用接口API,设计思想出现了变化,具体的可自行搜索,此处主要介绍下Camera2的常见类以及使用流程。CameraCap…

fetch 不是xhr_春招|前端2019应届春招:不是被大厂选,而是选大厂(字节跳动,美团,网易)...

作者:Thescavenger链接:https://www.nowcoder.com/discuss/163165来源:牛客网你需要的前端面经个人情况本科,成都双非大学,大三开始正式学习前端,主攻 react,目前大四。已拿美团、字节跳动 offe…

vscode编辑python_VSCode+Python开发环境

准备开始转向用VSCode做开发,所以把一些常用的开发环境转移到VSCode上。 这次搭建的是Python3的开发环境。 其他相关博文: 一、测试环境 Windows 10 VSCode v1.11.1 Python v3.6.1 二、安装Visual Studio Code 三、安装Python这一步,记得…

多帧点云数据拼接合并_PCL点云处理实践(二):点云的处理和拼接

滤除背景我们获得的点云可能包含一部分背景的点云。要去除背景&#xff0c;只保留人体信息&#xff0c;最简单的方式是使用直通滤波器滤除较远点。这部分代码如下&#xff1a;123456pcl::PassThrough<:pointxyz>pass; //设置滤波器对象pass.setInputCloud(cloud); //设置…

html5 css3浏览器,五大主流浏览器CSS3和HTML5兼容性大比拼

五大主流浏览器CSS3和HTML5兼容性大比拼出处&#xff1a;快科技 2011-05-26 16:15:42 编辑&#xff1a;萧萧[爆料] 收藏文章各大主流浏览器对CSS3和HTML5的支持越来越完善&#xff0c;曾经让多少前端开发人员心碎的IE系也开始拥抱标准。就在前几天&#xff0c;W3C的HTML5社…

自学python 编程基础知识_python学习-基础知识-1

1、计算机历史 计算机使用高低电压的两种状态来描述信息。计算机可以理解的只有二进制数据即010100011....&#xff0c;1个比特位可以表示的状态只有2种&#xff0c;n个比特位可以表示的状态有2的n次方种。 所以如果想要描述天气状态&#xff1a;天晴、下雨、刮风、下雪、霜冻&…

comparator 字符串比较大小_Java中Comparable和Comparator实现对象比较

当需要排序的集合或数组不是单纯的数字型时&#xff0c;通常可以使用Comparator或Comparable&#xff0c;以简单的方式实现对象排序或自定义排序。A comparison function, which imposes a total ordering on some collection of objects. Comparators can be passed to a sort…

html中属性的作用,html的标签中 unselectable=on 属性的作用

在IE浏览器中&#xff0c;当input获得焦点时&#xff0c;点击有unselectable"on"属性的标签时&#xff0c;不会触发onblur事件。加上该属性的元素不能被选中。< !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">< html>< h…

一个控制器怎么转发到另外一个控制器_楼宇自动化系统(BAS),DDC,一个最核心的控制器...

楼宇自动化系统(BAS)&#xff0c;一个熟悉又陌生的系统楼宇自控系统(BAS系统)设有一个中央监控中心&#xff0c;系统配置一个或多个网络控制器&#xff0c;由多条总线或计算机网络将各种功能的控制器与中央工作站相连&#xff0c;完成对空调、给排水、通风、电梯等子系统的监控…

秒表计时器怎么读_秒表怎么读数

展开全部秒表的大圈为秒&#xff0c;小圈为分。若大圈是30分格(顶上写的是30&#xff0c;可能有60格&#xff0c;表明精度到半秒)&#xff0c;小圈里62616964757a686964616fe59b9ee7ad9431333431366239一分钟就分为两小格&#xff0c;读完整的几分&#xff0c;若过了一小格&…

html封装windows,windows 系统封装,打造一份属于自己的系统!

在电脑的使用过程中&#xff0c;由于我们每个人的使用习惯和使用方式不同&#xff0c;所以我们都会对Windows系统进行自己的设置&#xff0c;尤其是一些搞数码软件的&#xff0c;如果不小心系统坏了&#xff0c;重装系统后&#xff0c;还得一一去进行重新设置&#xff0c;非常麻…

daoi php_聊聊这些年用过的AOI

外面下着雨&#xff0c;我在家里宅&#xff0c;听着歌喝着去年的茶&#xff0c;无聊的很&#xff0c;开个话题聊下这些年用过的AOI。某年进入AOI这行&#xff0c;我的很多老同事都早已转行了&#xff0c;由于我没什么过人之处&#xff0c;只会死干&#xff0c; 现在还在做AOI。…

python语言例子_【Python】SimPy的使用示例-Go语言中文社区

使用SimPY进行离散事件仿真 SimPY是一个Python下的第三方库&#xff0c;可以方便的进行离散事件的仿真。仿真速度比较快。下面记录一下我的一点心得&#xff0c;不保证完全正确&#xff0c;供参考。 安装 $ pip install -U simpy pycharm可以再File | Settings | Project: Simu…

所有的图放到一个html,拖放是HTML5标准的组成部分,若想要把drag1图片放入d

dataTransfer 对象主要有两个方法&#xff1a;getData() 和 setData()&#xff0c;用来取值和保存值。setData() 方法的第一个参数&#xff0c;也是 getData() 方法唯一的一个参数&#xff0c;是一个字符串&#xff0c;表示保存的数据类型。IE只定义了"text" 或 &quo…