如何解决Gradle项目同步失败.基本功能(例如,编辑,调试)将无法正常运行 [英] How to solve Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly

查看:1479
本文介绍了如何解决Gradle项目同步失败.基本功能(例如,编辑,调试)将无法正常运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我编译项目并在设备上运行时,它无法正常工作,并且我通过USB电缆在真实设备中检查了应用程序,并且运行良好,但是当我尝试生成发行版APK或尝试生成调试APK时显示gradle同步失败的错误无法生成apk,并将警告/错误显示为

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错误:Gradle项目同步失败.基本功能(例如编辑,调试)将无法正常工作.

Android Studio 3.0.1 Error: Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly.

推荐答案

尝试一下 转到Android Studio>偏好设置">"Gradle" 然后将代理详细信息作为VM选项传递.

try this go to Android Studio > Preferences > Gradle then pass the proxy details as VM options.

-Dhttp.proxyHost=www.somehost.org -Dhttp.proxyPort=8080

我是通过使用 AndroidStudio gradle代理解决方案

这篇关于如何解决Gradle项目同步失败.基本功能(例如,编辑,调试)将无法正常运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆