简体   繁体   中英

App won't install on physical device - AndroidStudio

Yesterday i created my first android app (a simple app with two buttons showing two simple toasts). In Android Studio if I run it in the virtual device it works fine, but when I try to run it on my phone (I-9195 with android 4.4.2)the console says:

Waiting for device.
Target device: samsung-gt_i9195-0220d6fa
Uploading file
    local path: C:\Users\Stefano\AndroidStudioProjects\Prova1\app\build\outputs\apk\app-debug.apk
    remote path: /data/local/tmp/com.example.stefano.prova1
Installing com.example.stefano.prova1
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.stefano.prova1"

and it sticks here.

If I try to move the apk to the sd and then install it the phone shows an infinite "installing" and I have to exit to the home page.

If I try to install it via adb with the cmd the output is:

C:\Users\Stefano\AppData\Local\Android\sdk\platform-tools>adb install "C:\Users\Stefano\AndroidStudioProjects\Prova1\app
\build\outputs\apk\app-debug.apk"
2712 KB/s (936775 bytes in 0.337s)
        pkg: /data/local/tmp/app-debug.apk

and it sticks here.

I activated in the developer options the usb debugging and I allowed the pc, adb recognizes my phone ,I tried to restart adb but it didn't helped.

Can someone help me?

To rule it out, have you tried installing another app from the Play store or similar? It would be interesting to see if they can install okay.

It may be that there is another process blocking your installation.

If you are unable to install from the Play store then try the following: Settings > Apps > All > scroll down to Google Play Store > Force stop, clear cache and data for the app

Attempt to download another app from the store and if that succeeds then you should be able to install your app via adb.

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