简体   繁体   中英

Android Studio won't apply changes in code

EDIT2: Seems to be working now. It was just my computer that were so slow so I thought nothing was happening...

I followed the instructions in the Android Studio introduction meticulously, but it doesn't apply the code changes except for the "Hello World" program which runs over and over again.

Introduction: https://developer.android.com/training/basics/firstapp/creating-project

This is the program I'm trying to run (at the end of the page): https://developer.android.com/training/basics/firstapp/starting-activity

The buttons "Apply changes and restart activity" and "Apply code changes" are grey and also say "(disabled: device not connected)".

I have tried to get them working through applying several tips but they stay grey.

Android Studios version: 3.5.2, just installed.

Help me stackoverflow, you are my only hope.

EDIT: this is what my run configuration looks like now: https://ibb.co/JQT4x4T Right now AS can't run any app, not even "Hello World".

Connect your USB cable to your device -> In mobile settings -> About Phone -> keep tapping on Version option (till you get a message 'Developer Mode enabled') -> Go back to settings of mobile -> Settings of mobile -> Developer Options -> some cases of phones it maybe present under Additional Settings option (Oppo phones) -> Developer Options -> enable -> USB Debugging enable ->

Now, in the toolbar you will see your device name as of Android 3.5 update and then click on Debug !

Happy Coding!

Then your device isn't properly active or connected

connect USB cable to your device then go to settings to activate developers option and enable debugging mode

also make sure you device name shows in the 'available device' before running

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