Search code examples
androidandroid-studioadb

Android Studio: Error "No target device" and the files and packages under project all are marked red


  1. In the project view on the left, all the files are marked red. But when I run the project in AVD, it runs normally. Does the red sign have any impact?

  2. When I connect my phone to Android Studio, it can't found my device. Instead it shows:

Error running app:No target device found.

This is the screenshot of my project:

this is the issue


Solution

  • 1,you project added vcs,but the files no added. so the files is red.you could add this files into vcs,if you use git,you could run "git add ."

    2,you could restart your AS or pc.