Xcode 8: Unable to Accept License Agreement on OS X El Capitan 10.11.6 I have downloaded Xcode 8 from App Store. on clicking Xcode icon it is showing the following:



After clicking on Agree button it asks for the username and password. On entering the username and password nothing is happening.
Try using xcodebuild to accept the license. Quit Xcode and run the following:

sudo xcodebuild -license accept


You may need to use xcode-select --switch first to switch Xcode version if you have multiple Xcode apps on your system.