简体   繁体   中英

Android Studio App not running on Device and Emulator

App doesn't run on both Emulator and Device on MAC, I only get an error saying client not ready yet.

I tried Invalidating and Restarting Android studio, tried to close app, uninstall, rerun, disabling instant run,Clean Project, Rebuild, Deleting Gradle but none of these worked.

below is the run log that I'm getting.

$ adb push /Users/username/app/App/build/generalDebug-1.6.1-530966e6.apk /data/local/tmp/com.site.app $ adb shell pm install -r "/data/local/tmp/com.site.app” Success

Client not ready yet..

Does anyone know a solution for it?

经过大量尝试,我最终通过关闭项目并重新导入来解决了该问题。

Are you exporting the activity exported. The activity needs to be exported for adb to use it.

Try adding the exported tag explicitly as shown below:

<activity
    android:name=".my.MyActivity"
    android:exported="true"/>

I hope this helps.

  1. go to tools.
  2. navigate Android.
  3. click on Enable ADB integration (bear in mind , you have to tick on ADB integration)

Create another virtual device, make sure devices virtual image is available in sdk or download and update. Check laucher activty in manifest and make sure its properly called.

Uninstall the Android studio and install the latest one.Then go to the

File -> Manage IDE Settings -> Restore Default settings

update the Android SDK location in settings.

Then boom.... IDE will working as it was working normally.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM