本文介绍了如何解决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>偏好设置">"Gradle"然后将代理详细信息作为VM选项传递.

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

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

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

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

10-27 12:53