Android Studio is just killing me. I'm migrating over from Eclipse and am unable to produce LogCat output. I just created a simple hello world app complete with a single line of System.out.println("hello world");
Regardless of whether I run this on an emulator or on a USB device, I get no LogCat output.
I reinstalled Android Studio, and then I got the correct output for a few executions. Now I'm back to no output. I tried restarting the computer, but this didn't correct anything.
Obviously, I can't reinstall the program every time LogCat output stops being produced, and I can't program without the ability to see console output. I'm beyond frustrated.
Here are a couple of clues:
adb
from the command line. Since I installed my SDK along with Android Studio, I have no idea where the adb
application exists, so I don't know how to add it to my PATH variable. Even so, I don't think that this has anything to do with why LogCat output isn't produced by Android Studio. I have tried restarting the LogCat by clicking on the icon, but this does nothing.
I realize that there are many other posts on this same type of issue, but the solutions suggested there are not resolving my issue. I am grateful for any help.
1) Don't use System.out.println. Import android.util.Log and then use
Log.e("Randall", "Hello World");
Additionally, adb should be found in your
sdk/platform-tools/adb
folder
我以前没有用过android studio,我是蚀家伙,但是也许您应该尝试Log.d()...
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.