When i compile the Project and Run on the device than it's working fine and i checked the app in real device by USB Cable and it's running perfect but when i try to generate the release apk or try to generate the debug apk than it show The Error that gradle sync faild can not generate the apk and shows the warning/Error as
Android Studio 3.0.1 Error: Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly.