Not able to debug app on android device - Android Studio 2.0












32















I am not able to debug an app on my device (Asus Zenphone 2) after I updated android studio to 2.0. I keep seeing below message in debug tab right after I click on debug icon in Android studio.



Message in debug tab in Android Studio UI



---------------------------------------------------------------
Waiting for application to come online: packagename
Waiting for application to come online: packagename
Waiting for application to come online: packagename
Waiting for application to come online: packagename


I keep seeing Alert Dialog with the title "Waiting for Debugger" and Force close button all the time.



I searched but it seems only two results from google for that message.



I restarted Android studio, checked developer settings on phone...



Have anyone faced with this issue. Please help me. I cannot run the emulator, because my mac will be too lag. Thank you in advance.










share|improve this question

























  • Are you able to run the app, without the debugger? Is the updated app getting installed, but then just cannot be run by the IDE?

    – CommonsWare
    Apr 19 '16 at 16:09






  • 1





    Yes, I can run app without the debugger.

    – t4nhpt
    Apr 19 '16 at 16:11






  • 1





    OK, so it's not something tied to the MAC address registration stuff. You might try disabling Instant Run and see if that helps. You will find that in Settings > Build, Execution, Deployment > Instant Run in Android Studio 2.0.

    – CommonsWare
    Apr 19 '16 at 16:14











  • Just disabled Instant Run and there is no luck. I afraid that the phone block app for debugging. When updating Android Studio, I also try to configure something with CM Applock. Then I disable all but still got that error.

    – t4nhpt
    Apr 19 '16 at 16:22











  • It is strange that this block only occurred when you upgraded to Android Studio 2.0, though. However, I am out of ideas as to what the problem might be.

    – CommonsWare
    Apr 19 '16 at 16:24
















32















I am not able to debug an app on my device (Asus Zenphone 2) after I updated android studio to 2.0. I keep seeing below message in debug tab right after I click on debug icon in Android studio.



Message in debug tab in Android Studio UI



---------------------------------------------------------------
Waiting for application to come online: packagename
Waiting for application to come online: packagename
Waiting for application to come online: packagename
Waiting for application to come online: packagename


I keep seeing Alert Dialog with the title "Waiting for Debugger" and Force close button all the time.



I searched but it seems only two results from google for that message.



I restarted Android studio, checked developer settings on phone...



Have anyone faced with this issue. Please help me. I cannot run the emulator, because my mac will be too lag. Thank you in advance.










share|improve this question

























  • Are you able to run the app, without the debugger? Is the updated app getting installed, but then just cannot be run by the IDE?

    – CommonsWare
    Apr 19 '16 at 16:09






  • 1





    Yes, I can run app without the debugger.

    – t4nhpt
    Apr 19 '16 at 16:11






  • 1





    OK, so it's not something tied to the MAC address registration stuff. You might try disabling Instant Run and see if that helps. You will find that in Settings > Build, Execution, Deployment > Instant Run in Android Studio 2.0.

    – CommonsWare
    Apr 19 '16 at 16:14











  • Just disabled Instant Run and there is no luck. I afraid that the phone block app for debugging. When updating Android Studio, I also try to configure something with CM Applock. Then I disable all but still got that error.

    – t4nhpt
    Apr 19 '16 at 16:22











  • It is strange that this block only occurred when you upgraded to Android Studio 2.0, though. However, I am out of ideas as to what the problem might be.

    – CommonsWare
    Apr 19 '16 at 16:24














32












32








32


4






I am not able to debug an app on my device (Asus Zenphone 2) after I updated android studio to 2.0. I keep seeing below message in debug tab right after I click on debug icon in Android studio.



Message in debug tab in Android Studio UI



---------------------------------------------------------------
Waiting for application to come online: packagename
Waiting for application to come online: packagename
Waiting for application to come online: packagename
Waiting for application to come online: packagename


I keep seeing Alert Dialog with the title "Waiting for Debugger" and Force close button all the time.



I searched but it seems only two results from google for that message.



I restarted Android studio, checked developer settings on phone...



Have anyone faced with this issue. Please help me. I cannot run the emulator, because my mac will be too lag. Thank you in advance.










share|improve this question
















I am not able to debug an app on my device (Asus Zenphone 2) after I updated android studio to 2.0. I keep seeing below message in debug tab right after I click on debug icon in Android studio.



Message in debug tab in Android Studio UI



---------------------------------------------------------------
Waiting for application to come online: packagename
Waiting for application to come online: packagename
Waiting for application to come online: packagename
Waiting for application to come online: packagename


I keep seeing Alert Dialog with the title "Waiting for Debugger" and Force close button all the time.



I searched but it seems only two results from google for that message.



I restarted Android studio, checked developer settings on phone...



Have anyone faced with this issue. Please help me. I cannot run the emulator, because my mac will be too lag. Thank you in advance.







android debugging android-studio-2.0






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 18 '17 at 2:05







t4nhpt

















asked Apr 19 '16 at 16:07









t4nhptt4nhpt

3,87322438




3,87322438













  • Are you able to run the app, without the debugger? Is the updated app getting installed, but then just cannot be run by the IDE?

    – CommonsWare
    Apr 19 '16 at 16:09






  • 1





    Yes, I can run app without the debugger.

    – t4nhpt
    Apr 19 '16 at 16:11






  • 1





    OK, so it's not something tied to the MAC address registration stuff. You might try disabling Instant Run and see if that helps. You will find that in Settings > Build, Execution, Deployment > Instant Run in Android Studio 2.0.

    – CommonsWare
    Apr 19 '16 at 16:14











  • Just disabled Instant Run and there is no luck. I afraid that the phone block app for debugging. When updating Android Studio, I also try to configure something with CM Applock. Then I disable all but still got that error.

    – t4nhpt
    Apr 19 '16 at 16:22











  • It is strange that this block only occurred when you upgraded to Android Studio 2.0, though. However, I am out of ideas as to what the problem might be.

    – CommonsWare
    Apr 19 '16 at 16:24



















  • Are you able to run the app, without the debugger? Is the updated app getting installed, but then just cannot be run by the IDE?

    – CommonsWare
    Apr 19 '16 at 16:09






  • 1





    Yes, I can run app without the debugger.

    – t4nhpt
    Apr 19 '16 at 16:11






  • 1





    OK, so it's not something tied to the MAC address registration stuff. You might try disabling Instant Run and see if that helps. You will find that in Settings > Build, Execution, Deployment > Instant Run in Android Studio 2.0.

    – CommonsWare
    Apr 19 '16 at 16:14











  • Just disabled Instant Run and there is no luck. I afraid that the phone block app for debugging. When updating Android Studio, I also try to configure something with CM Applock. Then I disable all but still got that error.

    – t4nhpt
    Apr 19 '16 at 16:22











  • It is strange that this block only occurred when you upgraded to Android Studio 2.0, though. However, I am out of ideas as to what the problem might be.

    – CommonsWare
    Apr 19 '16 at 16:24

















Are you able to run the app, without the debugger? Is the updated app getting installed, but then just cannot be run by the IDE?

– CommonsWare
Apr 19 '16 at 16:09





Are you able to run the app, without the debugger? Is the updated app getting installed, but then just cannot be run by the IDE?

– CommonsWare
Apr 19 '16 at 16:09




1




1





Yes, I can run app without the debugger.

– t4nhpt
Apr 19 '16 at 16:11





Yes, I can run app without the debugger.

– t4nhpt
Apr 19 '16 at 16:11




1




1





OK, so it's not something tied to the MAC address registration stuff. You might try disabling Instant Run and see if that helps. You will find that in Settings > Build, Execution, Deployment > Instant Run in Android Studio 2.0.

– CommonsWare
Apr 19 '16 at 16:14





OK, so it's not something tied to the MAC address registration stuff. You might try disabling Instant Run and see if that helps. You will find that in Settings > Build, Execution, Deployment > Instant Run in Android Studio 2.0.

– CommonsWare
Apr 19 '16 at 16:14













Just disabled Instant Run and there is no luck. I afraid that the phone block app for debugging. When updating Android Studio, I also try to configure something with CM Applock. Then I disable all but still got that error.

– t4nhpt
Apr 19 '16 at 16:22





Just disabled Instant Run and there is no luck. I afraid that the phone block app for debugging. When updating Android Studio, I also try to configure something with CM Applock. Then I disable all but still got that error.

– t4nhpt
Apr 19 '16 at 16:22













It is strange that this block only occurred when you upgraded to Android Studio 2.0, though. However, I am out of ideas as to what the problem might be.

– CommonsWare
Apr 19 '16 at 16:24





It is strange that this block only occurred when you upgraded to Android Studio 2.0, though. However, I am out of ideas as to what the problem might be.

– CommonsWare
Apr 19 '16 at 16:24












11 Answers
11






active

oldest

votes


















24














I found the issue. See this image below:



Choice



First I select the second option, and it worked fine. But then don't know why I change to select first option. So, the debugger shows the message Waiting for application to come online forever. And I did not notice that, just thought another app prevent me debug or that was an issue with Android Studio 2.0.



So, just check to second option will solve my issue. Thank all.






share|improve this answer





















  • 2





    wow saved my day! was pissed with odd behavior!

    – NitZRobotKoder
    Aug 2 '16 at 16:26



















16














Restarting Android Studios (2.1.1) resolved this for me.






share|improve this answer
























  • Restarting worked for me too. But doing it often is a pain.

    – Jaseem Abbas
    Sep 14 '16 at 6:09











  • I updated to Android Studios 2.1.3 and have not experienced this issue since. Not sure if it is related.

    – running-codebase
    Sep 14 '16 at 6:27






  • 1





    I am running on 2.1.3 and still have the same issues. I do not think it is related.

    – Jaseem Abbas
    Sep 14 '16 at 6:30



















10














There are two possibilities:



1.USB Debugging off :




  • Start Developer Option of your devices

  • Switch On USB Debugging


2.In Android-Studio : File -> Invalidate Caches / Restart



anyone can be useful for you.Try it






share|improve this answer



















  • 3





    Invalidate Caches / Restart worked for me!

    – Danny Yassine
    Sep 8 '16 at 17:59



















9














The correct answer is close your Android Device Manager.
None of these suggestions worked for me till I closed it.






share|improve this answer































    1














    if you get this problem on the emulator, running adb reconnect worked for me. there is a similar command for devices adb reconnect device






    share|improve this answer































      1














      **




      This answer might help for those Who have successfully connected their
      device along netbeans NB Android but on debug there's no application
      being appear on device.




      **



      Ok so solution is check your android device version in mobile setting click on about device at last: you will know your android version there.



      Now choose the same version for your netbeans android project.



      Right click on project name click on properties and then change target with same as your android device.



      (In my case android version was 4.4.2 so I selected the same for my project target)



      Before to go ahead click on service tab next to project tab in netbeans then right click on Android device and click on restart ADB.



      Finally you need to right click on project again and click on clear and build.



      Now you can run with hope to get result.






      share|improve this answer































        1














        Nothing worked for me except one solution...



        Clearing the Intellij IDEA (Android Studio) .idea directory which contains configuration information worked for me:



        Exit Android Studio
        Navigate to the project you are trying to debug
        Backup any files inside .idea that you modified (if your project checks any of these into VCS)
        Delete .idea directory
        Open the project in Android Studio






        share|improve this answer
























        • This worked for me. Thank you very much

          – Vishnu
          Dec 6 '18 at 7:47



















        0














        I had to remove the parameter



         android:exported = "false"


        from the main activity.






        share|improve this answer































          0














          I just wanted to share my experience as I had the same error and there was no way to solve it using all the solutions you guys posted. I even deleted several times my virtual device, no way to make it work again.



          In my App I have a custom permission com.example.CUSTOM_PERMISSION and I wanted to use it to protect my Main Activty from a confused deputy attack.



              <permission android:name="com.example.CUSTOM_PERMISSION"
          android:label="@string/permlab_deadlyActivity"
          android:description="@string/permdesc_deadlyActivity"
          android:permissionGroup="android.permission-group.COST_MONEY"
          android:protectionLevel="dangerous" />


          .
          .
          .



              <activity
          android:permission="com.example.CUSTOM_PERMISSION"
          android:name=".MainActivity">
          <intent-filter>
          <action android:name="android.intent.action.MAIN"/>

          <category android:name="android.intent.category.LAUNCHER"/>
          </intent-filter>
          </activity>


          Somehow that property android:permission was preventing my app to install and run on the virtual device, even though it could be compiled and build with Gradle successfully.
          Just after removing it, everything is fine again
          I am not sure the app is protected this way, I'm building another test app to try performing a confuse deputy and see if the declaration of the custom is just enough.



          Hope this can help somebody that was getting mad like me!






          share|improve this answer































            0














            I had this problem in the Android emulator, and it was solved by going to Tools->AVD Manager, selecting the device, right click "Cold Boot Now".






            share|improve this answer































              0














              The solution which helped me is to click on attach the debugger to android Process and set debugger to java.






              share|improve this answer








              New contributor




              Aayush Vijay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.




















                Your Answer






                StackExchange.ifUsing("editor", function () {
                StackExchange.using("externalEditor", function () {
                StackExchange.using("snippets", function () {
                StackExchange.snippets.init();
                });
                });
                }, "code-snippets");

                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "1"
                };
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function() {
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled) {
                StackExchange.using("snippets", function() {
                createEditor();
                });
                }
                else {
                createEditor();
                }
                });

                function createEditor() {
                StackExchange.prepareEditor({
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: true,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: 10,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                },
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                });


                }
                });














                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f36723813%2fnot-able-to-debug-app-on-android-device-android-studio-2-0%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                11 Answers
                11






                active

                oldest

                votes








                11 Answers
                11






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                24














                I found the issue. See this image below:



                Choice



                First I select the second option, and it worked fine. But then don't know why I change to select first option. So, the debugger shows the message Waiting for application to come online forever. And I did not notice that, just thought another app prevent me debug or that was an issue with Android Studio 2.0.



                So, just check to second option will solve my issue. Thank all.






                share|improve this answer





















                • 2





                  wow saved my day! was pissed with odd behavior!

                  – NitZRobotKoder
                  Aug 2 '16 at 16:26
















                24














                I found the issue. See this image below:



                Choice



                First I select the second option, and it worked fine. But then don't know why I change to select first option. So, the debugger shows the message Waiting for application to come online forever. And I did not notice that, just thought another app prevent me debug or that was an issue with Android Studio 2.0.



                So, just check to second option will solve my issue. Thank all.






                share|improve this answer





















                • 2





                  wow saved my day! was pissed with odd behavior!

                  – NitZRobotKoder
                  Aug 2 '16 at 16:26














                24












                24








                24







                I found the issue. See this image below:



                Choice



                First I select the second option, and it worked fine. But then don't know why I change to select first option. So, the debugger shows the message Waiting for application to come online forever. And I did not notice that, just thought another app prevent me debug or that was an issue with Android Studio 2.0.



                So, just check to second option will solve my issue. Thank all.






                share|improve this answer















                I found the issue. See this image below:



                Choice



                First I select the second option, and it worked fine. But then don't know why I change to select first option. So, the debugger shows the message Waiting for application to come online forever. And I did not notice that, just thought another app prevent me debug or that was an issue with Android Studio 2.0.



                So, just check to second option will solve my issue. Thank all.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jun 8 '16 at 7:06

























                answered Apr 22 '16 at 15:54









                t4nhptt4nhpt

                3,87322438




                3,87322438








                • 2





                  wow saved my day! was pissed with odd behavior!

                  – NitZRobotKoder
                  Aug 2 '16 at 16:26














                • 2





                  wow saved my day! was pissed with odd behavior!

                  – NitZRobotKoder
                  Aug 2 '16 at 16:26








                2




                2





                wow saved my day! was pissed with odd behavior!

                – NitZRobotKoder
                Aug 2 '16 at 16:26





                wow saved my day! was pissed with odd behavior!

                – NitZRobotKoder
                Aug 2 '16 at 16:26













                16














                Restarting Android Studios (2.1.1) resolved this for me.






                share|improve this answer
























                • Restarting worked for me too. But doing it often is a pain.

                  – Jaseem Abbas
                  Sep 14 '16 at 6:09











                • I updated to Android Studios 2.1.3 and have not experienced this issue since. Not sure if it is related.

                  – running-codebase
                  Sep 14 '16 at 6:27






                • 1





                  I am running on 2.1.3 and still have the same issues. I do not think it is related.

                  – Jaseem Abbas
                  Sep 14 '16 at 6:30
















                16














                Restarting Android Studios (2.1.1) resolved this for me.






                share|improve this answer
























                • Restarting worked for me too. But doing it often is a pain.

                  – Jaseem Abbas
                  Sep 14 '16 at 6:09











                • I updated to Android Studios 2.1.3 and have not experienced this issue since. Not sure if it is related.

                  – running-codebase
                  Sep 14 '16 at 6:27






                • 1





                  I am running on 2.1.3 and still have the same issues. I do not think it is related.

                  – Jaseem Abbas
                  Sep 14 '16 at 6:30














                16












                16








                16







                Restarting Android Studios (2.1.1) resolved this for me.






                share|improve this answer













                Restarting Android Studios (2.1.1) resolved this for me.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jun 7 '16 at 1:58









                running-codebaserunning-codebase

                5431616




                5431616













                • Restarting worked for me too. But doing it often is a pain.

                  – Jaseem Abbas
                  Sep 14 '16 at 6:09











                • I updated to Android Studios 2.1.3 and have not experienced this issue since. Not sure if it is related.

                  – running-codebase
                  Sep 14 '16 at 6:27






                • 1





                  I am running on 2.1.3 and still have the same issues. I do not think it is related.

                  – Jaseem Abbas
                  Sep 14 '16 at 6:30



















                • Restarting worked for me too. But doing it often is a pain.

                  – Jaseem Abbas
                  Sep 14 '16 at 6:09











                • I updated to Android Studios 2.1.3 and have not experienced this issue since. Not sure if it is related.

                  – running-codebase
                  Sep 14 '16 at 6:27






                • 1





                  I am running on 2.1.3 and still have the same issues. I do not think it is related.

                  – Jaseem Abbas
                  Sep 14 '16 at 6:30

















                Restarting worked for me too. But doing it often is a pain.

                – Jaseem Abbas
                Sep 14 '16 at 6:09





                Restarting worked for me too. But doing it often is a pain.

                – Jaseem Abbas
                Sep 14 '16 at 6:09













                I updated to Android Studios 2.1.3 and have not experienced this issue since. Not sure if it is related.

                – running-codebase
                Sep 14 '16 at 6:27





                I updated to Android Studios 2.1.3 and have not experienced this issue since. Not sure if it is related.

                – running-codebase
                Sep 14 '16 at 6:27




                1




                1





                I am running on 2.1.3 and still have the same issues. I do not think it is related.

                – Jaseem Abbas
                Sep 14 '16 at 6:30





                I am running on 2.1.3 and still have the same issues. I do not think it is related.

                – Jaseem Abbas
                Sep 14 '16 at 6:30











                10














                There are two possibilities:



                1.USB Debugging off :




                • Start Developer Option of your devices

                • Switch On USB Debugging


                2.In Android-Studio : File -> Invalidate Caches / Restart



                anyone can be useful for you.Try it






                share|improve this answer



















                • 3





                  Invalidate Caches / Restart worked for me!

                  – Danny Yassine
                  Sep 8 '16 at 17:59
















                10














                There are two possibilities:



                1.USB Debugging off :




                • Start Developer Option of your devices

                • Switch On USB Debugging


                2.In Android-Studio : File -> Invalidate Caches / Restart



                anyone can be useful for you.Try it






                share|improve this answer



















                • 3





                  Invalidate Caches / Restart worked for me!

                  – Danny Yassine
                  Sep 8 '16 at 17:59














                10












                10








                10







                There are two possibilities:



                1.USB Debugging off :




                • Start Developer Option of your devices

                • Switch On USB Debugging


                2.In Android-Studio : File -> Invalidate Caches / Restart



                anyone can be useful for you.Try it






                share|improve this answer













                There are two possibilities:



                1.USB Debugging off :




                • Start Developer Option of your devices

                • Switch On USB Debugging


                2.In Android-Studio : File -> Invalidate Caches / Restart



                anyone can be useful for you.Try it







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Aug 16 '16 at 12:39









                khushikhushi

                10112




                10112








                • 3





                  Invalidate Caches / Restart worked for me!

                  – Danny Yassine
                  Sep 8 '16 at 17:59














                • 3





                  Invalidate Caches / Restart worked for me!

                  – Danny Yassine
                  Sep 8 '16 at 17:59








                3




                3





                Invalidate Caches / Restart worked for me!

                – Danny Yassine
                Sep 8 '16 at 17:59





                Invalidate Caches / Restart worked for me!

                – Danny Yassine
                Sep 8 '16 at 17:59











                9














                The correct answer is close your Android Device Manager.
                None of these suggestions worked for me till I closed it.






                share|improve this answer




























                  9














                  The correct answer is close your Android Device Manager.
                  None of these suggestions worked for me till I closed it.






                  share|improve this answer


























                    9












                    9








                    9







                    The correct answer is close your Android Device Manager.
                    None of these suggestions worked for me till I closed it.






                    share|improve this answer













                    The correct answer is close your Android Device Manager.
                    None of these suggestions worked for me till I closed it.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jan 21 '17 at 17:09









                    JustAGuyJustAGuy

                    1,29562339




                    1,29562339























                        1














                        if you get this problem on the emulator, running adb reconnect worked for me. there is a similar command for devices adb reconnect device






                        share|improve this answer




























                          1














                          if you get this problem on the emulator, running adb reconnect worked for me. there is a similar command for devices adb reconnect device






                          share|improve this answer


























                            1












                            1








                            1







                            if you get this problem on the emulator, running adb reconnect worked for me. there is a similar command for devices adb reconnect device






                            share|improve this answer













                            if you get this problem on the emulator, running adb reconnect worked for me. there is a similar command for devices adb reconnect device







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Sep 23 '16 at 14:22









                            SamerSamer

                            11627




                            11627























                                1














                                **




                                This answer might help for those Who have successfully connected their
                                device along netbeans NB Android but on debug there's no application
                                being appear on device.




                                **



                                Ok so solution is check your android device version in mobile setting click on about device at last: you will know your android version there.



                                Now choose the same version for your netbeans android project.



                                Right click on project name click on properties and then change target with same as your android device.



                                (In my case android version was 4.4.2 so I selected the same for my project target)



                                Before to go ahead click on service tab next to project tab in netbeans then right click on Android device and click on restart ADB.



                                Finally you need to right click on project again and click on clear and build.



                                Now you can run with hope to get result.






                                share|improve this answer




























                                  1














                                  **




                                  This answer might help for those Who have successfully connected their
                                  device along netbeans NB Android but on debug there's no application
                                  being appear on device.




                                  **



                                  Ok so solution is check your android device version in mobile setting click on about device at last: you will know your android version there.



                                  Now choose the same version for your netbeans android project.



                                  Right click on project name click on properties and then change target with same as your android device.



                                  (In my case android version was 4.4.2 so I selected the same for my project target)



                                  Before to go ahead click on service tab next to project tab in netbeans then right click on Android device and click on restart ADB.



                                  Finally you need to right click on project again and click on clear and build.



                                  Now you can run with hope to get result.






                                  share|improve this answer


























                                    1












                                    1








                                    1







                                    **




                                    This answer might help for those Who have successfully connected their
                                    device along netbeans NB Android but on debug there's no application
                                    being appear on device.




                                    **



                                    Ok so solution is check your android device version in mobile setting click on about device at last: you will know your android version there.



                                    Now choose the same version for your netbeans android project.



                                    Right click on project name click on properties and then change target with same as your android device.



                                    (In my case android version was 4.4.2 so I selected the same for my project target)



                                    Before to go ahead click on service tab next to project tab in netbeans then right click on Android device and click on restart ADB.



                                    Finally you need to right click on project again and click on clear and build.



                                    Now you can run with hope to get result.






                                    share|improve this answer













                                    **




                                    This answer might help for those Who have successfully connected their
                                    device along netbeans NB Android but on debug there's no application
                                    being appear on device.




                                    **



                                    Ok so solution is check your android device version in mobile setting click on about device at last: you will know your android version there.



                                    Now choose the same version for your netbeans android project.



                                    Right click on project name click on properties and then change target with same as your android device.



                                    (In my case android version was 4.4.2 so I selected the same for my project target)



                                    Before to go ahead click on service tab next to project tab in netbeans then right click on Android device and click on restart ADB.



                                    Finally you need to right click on project again and click on clear and build.



                                    Now you can run with hope to get result.







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered May 9 '17 at 16:21









                                    A.Aleem11A.Aleem11

                                    98399




                                    98399























                                        1














                                        Nothing worked for me except one solution...



                                        Clearing the Intellij IDEA (Android Studio) .idea directory which contains configuration information worked for me:



                                        Exit Android Studio
                                        Navigate to the project you are trying to debug
                                        Backup any files inside .idea that you modified (if your project checks any of these into VCS)
                                        Delete .idea directory
                                        Open the project in Android Studio






                                        share|improve this answer
























                                        • This worked for me. Thank you very much

                                          – Vishnu
                                          Dec 6 '18 at 7:47
















                                        1














                                        Nothing worked for me except one solution...



                                        Clearing the Intellij IDEA (Android Studio) .idea directory which contains configuration information worked for me:



                                        Exit Android Studio
                                        Navigate to the project you are trying to debug
                                        Backup any files inside .idea that you modified (if your project checks any of these into VCS)
                                        Delete .idea directory
                                        Open the project in Android Studio






                                        share|improve this answer
























                                        • This worked for me. Thank you very much

                                          – Vishnu
                                          Dec 6 '18 at 7:47














                                        1












                                        1








                                        1







                                        Nothing worked for me except one solution...



                                        Clearing the Intellij IDEA (Android Studio) .idea directory which contains configuration information worked for me:



                                        Exit Android Studio
                                        Navigate to the project you are trying to debug
                                        Backup any files inside .idea that you modified (if your project checks any of these into VCS)
                                        Delete .idea directory
                                        Open the project in Android Studio






                                        share|improve this answer













                                        Nothing worked for me except one solution...



                                        Clearing the Intellij IDEA (Android Studio) .idea directory which contains configuration information worked for me:



                                        Exit Android Studio
                                        Navigate to the project you are trying to debug
                                        Backup any files inside .idea that you modified (if your project checks any of these into VCS)
                                        Delete .idea directory
                                        Open the project in Android Studio







                                        share|improve this answer












                                        share|improve this answer



                                        share|improve this answer










                                        answered Oct 10 '17 at 19:34









                                        AshutoshAshutosh

                                        867




                                        867













                                        • This worked for me. Thank you very much

                                          – Vishnu
                                          Dec 6 '18 at 7:47



















                                        • This worked for me. Thank you very much

                                          – Vishnu
                                          Dec 6 '18 at 7:47

















                                        This worked for me. Thank you very much

                                        – Vishnu
                                        Dec 6 '18 at 7:47





                                        This worked for me. Thank you very much

                                        – Vishnu
                                        Dec 6 '18 at 7:47











                                        0














                                        I had to remove the parameter



                                         android:exported = "false"


                                        from the main activity.






                                        share|improve this answer




























                                          0














                                          I had to remove the parameter



                                           android:exported = "false"


                                          from the main activity.






                                          share|improve this answer


























                                            0












                                            0








                                            0







                                            I had to remove the parameter



                                             android:exported = "false"


                                            from the main activity.






                                            share|improve this answer













                                            I had to remove the parameter



                                             android:exported = "false"


                                            from the main activity.







                                            share|improve this answer












                                            share|improve this answer



                                            share|improve this answer










                                            answered Mar 14 '17 at 15:26









                                            Alberto MAlberto M

                                            6301830




                                            6301830























                                                0














                                                I just wanted to share my experience as I had the same error and there was no way to solve it using all the solutions you guys posted. I even deleted several times my virtual device, no way to make it work again.



                                                In my App I have a custom permission com.example.CUSTOM_PERMISSION and I wanted to use it to protect my Main Activty from a confused deputy attack.



                                                    <permission android:name="com.example.CUSTOM_PERMISSION"
                                                android:label="@string/permlab_deadlyActivity"
                                                android:description="@string/permdesc_deadlyActivity"
                                                android:permissionGroup="android.permission-group.COST_MONEY"
                                                android:protectionLevel="dangerous" />


                                                .
                                                .
                                                .



                                                    <activity
                                                android:permission="com.example.CUSTOM_PERMISSION"
                                                android:name=".MainActivity">
                                                <intent-filter>
                                                <action android:name="android.intent.action.MAIN"/>

                                                <category android:name="android.intent.category.LAUNCHER"/>
                                                </intent-filter>
                                                </activity>


                                                Somehow that property android:permission was preventing my app to install and run on the virtual device, even though it could be compiled and build with Gradle successfully.
                                                Just after removing it, everything is fine again
                                                I am not sure the app is protected this way, I'm building another test app to try performing a confuse deputy and see if the declaration of the custom is just enough.



                                                Hope this can help somebody that was getting mad like me!






                                                share|improve this answer




























                                                  0














                                                  I just wanted to share my experience as I had the same error and there was no way to solve it using all the solutions you guys posted. I even deleted several times my virtual device, no way to make it work again.



                                                  In my App I have a custom permission com.example.CUSTOM_PERMISSION and I wanted to use it to protect my Main Activty from a confused deputy attack.



                                                      <permission android:name="com.example.CUSTOM_PERMISSION"
                                                  android:label="@string/permlab_deadlyActivity"
                                                  android:description="@string/permdesc_deadlyActivity"
                                                  android:permissionGroup="android.permission-group.COST_MONEY"
                                                  android:protectionLevel="dangerous" />


                                                  .
                                                  .
                                                  .



                                                      <activity
                                                  android:permission="com.example.CUSTOM_PERMISSION"
                                                  android:name=".MainActivity">
                                                  <intent-filter>
                                                  <action android:name="android.intent.action.MAIN"/>

                                                  <category android:name="android.intent.category.LAUNCHER"/>
                                                  </intent-filter>
                                                  </activity>


                                                  Somehow that property android:permission was preventing my app to install and run on the virtual device, even though it could be compiled and build with Gradle successfully.
                                                  Just after removing it, everything is fine again
                                                  I am not sure the app is protected this way, I'm building another test app to try performing a confuse deputy and see if the declaration of the custom is just enough.



                                                  Hope this can help somebody that was getting mad like me!






                                                  share|improve this answer


























                                                    0












                                                    0








                                                    0







                                                    I just wanted to share my experience as I had the same error and there was no way to solve it using all the solutions you guys posted. I even deleted several times my virtual device, no way to make it work again.



                                                    In my App I have a custom permission com.example.CUSTOM_PERMISSION and I wanted to use it to protect my Main Activty from a confused deputy attack.



                                                        <permission android:name="com.example.CUSTOM_PERMISSION"
                                                    android:label="@string/permlab_deadlyActivity"
                                                    android:description="@string/permdesc_deadlyActivity"
                                                    android:permissionGroup="android.permission-group.COST_MONEY"
                                                    android:protectionLevel="dangerous" />


                                                    .
                                                    .
                                                    .



                                                        <activity
                                                    android:permission="com.example.CUSTOM_PERMISSION"
                                                    android:name=".MainActivity">
                                                    <intent-filter>
                                                    <action android:name="android.intent.action.MAIN"/>

                                                    <category android:name="android.intent.category.LAUNCHER"/>
                                                    </intent-filter>
                                                    </activity>


                                                    Somehow that property android:permission was preventing my app to install and run on the virtual device, even though it could be compiled and build with Gradle successfully.
                                                    Just after removing it, everything is fine again
                                                    I am not sure the app is protected this way, I'm building another test app to try performing a confuse deputy and see if the declaration of the custom is just enough.



                                                    Hope this can help somebody that was getting mad like me!






                                                    share|improve this answer













                                                    I just wanted to share my experience as I had the same error and there was no way to solve it using all the solutions you guys posted. I even deleted several times my virtual device, no way to make it work again.



                                                    In my App I have a custom permission com.example.CUSTOM_PERMISSION and I wanted to use it to protect my Main Activty from a confused deputy attack.



                                                        <permission android:name="com.example.CUSTOM_PERMISSION"
                                                    android:label="@string/permlab_deadlyActivity"
                                                    android:description="@string/permdesc_deadlyActivity"
                                                    android:permissionGroup="android.permission-group.COST_MONEY"
                                                    android:protectionLevel="dangerous" />


                                                    .
                                                    .
                                                    .



                                                        <activity
                                                    android:permission="com.example.CUSTOM_PERMISSION"
                                                    android:name=".MainActivity">
                                                    <intent-filter>
                                                    <action android:name="android.intent.action.MAIN"/>

                                                    <category android:name="android.intent.category.LAUNCHER"/>
                                                    </intent-filter>
                                                    </activity>


                                                    Somehow that property android:permission was preventing my app to install and run on the virtual device, even though it could be compiled and build with Gradle successfully.
                                                    Just after removing it, everything is fine again
                                                    I am not sure the app is protected this way, I'm building another test app to try performing a confuse deputy and see if the declaration of the custom is just enough.



                                                    Hope this can help somebody that was getting mad like me!







                                                    share|improve this answer












                                                    share|improve this answer



                                                    share|improve this answer










                                                    answered Nov 21 '18 at 9:58









                                                    Michele RomaniMichele Romani

                                                    116




                                                    116























                                                        0














                                                        I had this problem in the Android emulator, and it was solved by going to Tools->AVD Manager, selecting the device, right click "Cold Boot Now".






                                                        share|improve this answer




























                                                          0














                                                          I had this problem in the Android emulator, and it was solved by going to Tools->AVD Manager, selecting the device, right click "Cold Boot Now".






                                                          share|improve this answer


























                                                            0












                                                            0








                                                            0







                                                            I had this problem in the Android emulator, and it was solved by going to Tools->AVD Manager, selecting the device, right click "Cold Boot Now".






                                                            share|improve this answer













                                                            I had this problem in the Android emulator, and it was solved by going to Tools->AVD Manager, selecting the device, right click "Cold Boot Now".







                                                            share|improve this answer












                                                            share|improve this answer



                                                            share|improve this answer










                                                            answered Feb 5 at 16:19









                                                            user2709454user2709454

                                                            41444




                                                            41444























                                                                0














                                                                The solution which helped me is to click on attach the debugger to android Process and set debugger to java.






                                                                share|improve this answer








                                                                New contributor




                                                                Aayush Vijay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                Check out our Code of Conduct.

























                                                                  0














                                                                  The solution which helped me is to click on attach the debugger to android Process and set debugger to java.






                                                                  share|improve this answer








                                                                  New contributor




                                                                  Aayush Vijay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                  Check out our Code of Conduct.























                                                                    0












                                                                    0








                                                                    0







                                                                    The solution which helped me is to click on attach the debugger to android Process and set debugger to java.






                                                                    share|improve this answer








                                                                    New contributor




                                                                    Aayush Vijay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                    Check out our Code of Conduct.










                                                                    The solution which helped me is to click on attach the debugger to android Process and set debugger to java.







                                                                    share|improve this answer








                                                                    New contributor




                                                                    Aayush Vijay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                    Check out our Code of Conduct.









                                                                    share|improve this answer



                                                                    share|improve this answer






                                                                    New contributor




                                                                    Aayush Vijay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                    Check out our Code of Conduct.









                                                                    answered 2 days ago









                                                                    Aayush VijayAayush Vijay

                                                                    12




                                                                    12




                                                                    New contributor




                                                                    Aayush Vijay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                    Check out our Code of Conduct.





                                                                    New contributor





                                                                    Aayush Vijay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                    Check out our Code of Conduct.






                                                                    Aayush Vijay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                    Check out our Code of Conduct.






























                                                                        draft saved

                                                                        draft discarded




















































                                                                        Thanks for contributing an answer to Stack Overflow!


                                                                        • Please be sure to answer the question. Provide details and share your research!

                                                                        But avoid



                                                                        • Asking for help, clarification, or responding to other answers.

                                                                        • Making statements based on opinion; back them up with references or personal experience.


                                                                        To learn more, see our tips on writing great answers.




                                                                        draft saved


                                                                        draft discarded














                                                                        StackExchange.ready(
                                                                        function () {
                                                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f36723813%2fnot-able-to-debug-app-on-android-device-android-studio-2-0%23new-answer', 'question_page');
                                                                        }
                                                                        );

                                                                        Post as a guest















                                                                        Required, but never shown





















































                                                                        Required, but never shown














                                                                        Required, but never shown












                                                                        Required, but never shown







                                                                        Required, but never shown

































                                                                        Required, but never shown














                                                                        Required, but never shown












                                                                        Required, but never shown







                                                                        Required, but never shown







                                                                        Popular posts from this blog

                                                                        MongoDB - Not Authorized To Execute Command

                                                                        in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith

                                                                        How to fix TextFormField cause rebuild widget in Flutter