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'

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。
经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值