android studio报错提示: Gradle DSL method not found: 'android() 解决方案
原文错误提示:
Error:(16, 0) Gradle DSL method not found: 'Android()'
Possible causes:<ul><li>The project ‘XXXXXXX' may be using a version of Gradle that does not contain the method.
<a href="open.wrapper.file">Open Gradle wrapper file</a></li><li>The build file may be missing a Gradle plugin.
<a href="apply.gradle.plugin">Apply Gradle plugin</a></li>
错误原因:
android studio 引进项目时,自动查找本机是否有项目设置的SDK版本,若发现没有,我们会在project structure修改成自己的SDK。然而,修改后,AS会自动在项目下的build.gradle里添加上以下代码:
解决办法:
删除以上图片中红框中的代码,然后再执行build->Rebuild project,删除完之后的代码如下:
android studio报错提示: Gradle DSL method not found: 'android() 解决方案的更多相关文章
- Android Studio 报错Guest isn't online after 7 seconds 解决方案
最近使用真机模拟之后,再使用虚拟机就频繁出现这个问题; 解决步骤如下: 1.打开Android虚拟设备管理器, 2.查看Actoins栏下拉图标, 3.选择冷启动模式即可, 4.重启AVD正常;
- [原创] Gradle DSL method not found: 'android()' 和 buildToolsVersion is not specified 的解决办法。
今天在用Android Studio 2.0 打开别人的较早版本生成的工程时, 提示: Gradle DSL method not found: 'android()'. 解决办法为,打开根目录下面的 ...
- Gradle DSL method not found: 'android()
原文错误提示: Error:(16, 0) Gradle DSL method not found: 'android()'Possible causes:<ul><li>Th ...
- 【转】解决Gradle DSL method not found: ‘android()’
[转]解决Gradle DSL method not found: ‘android()’ 最近导入as的项目出了这样的问题 这个问题困扰了我很长时间,好吧,搜了半天全都是runProguard的,最 ...
- 我的Android进阶之旅------>解决Android Studio报错:DefaultAndroidProject : Unsupported major.minor version 52.0
问题描述 今天使用Android Studio 2.0打开我之前的项目时,编译报了如下错误: Error:Cause: com/android/build/gradle/internal/model/ ...
- Android Studio报错:DefaultAndroidProject : Unsupported major.minor version 52.0
今天使用Android Studio 2.0打开我之前的项目时,编译报了如下错误: Error:Cause: com/android/build/gradle/internal/model/Defau ...
- Android Studio报错Error:Failed to open zip file. Gradle's dependency cache may be corrupt
Android Studio导入项目后,Gradle编译失败,报错如下. Error:Failed to open zip file. Gradle's dependency cache may be ...
- 安卓 android studio 报错 The specified Android SDK Build Tools version (27.0.3) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle
今天将项目迁移到另一台笔记本,进行build出现以下问题,导致build失败 报错截图: 大致意思,目前使用的build工具版本27.0.3不合适.因为当前使用Gradle插件版本是3.2.1,这个版 ...
- 安卓 android studio 报错 Unknown host 'jcenter.bintray.com'. You may need to adjust the proxy settings in Gradle.
报错截图: 问题原因:因为build.gradle中jcenter()或者maven()被墙了,所以会出现这种情况. 解决方案:(我的gradle版本是:classpath 'com.android. ...
随机推荐
- LeetCode Algorithm 01_Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number. The ...
- Javascript和jquery事件--鼠标事件的小结
1.鼠标事件的主要事件应该是mouseup, mousedown, mousewheel, mousemove, mouseover, moveout. <1>其中mouseup和mous ...
- POJ 1466 Girls and Boys (ZOJ 1137 )最大独立点集
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=137 http://poj.org/problem?id=1466 题目大意: ...
- [React Intl] Render Content with Markup Using react-intl FormattedHTMLMessage
In this lesson, we’ll use the react-intl FormattedHTMLMessage component to display text with dynamic ...
- [Angular2 Router] Redirects and Path Matching - Avoid Common Routing Pitfall
In this tutorial we are going to learn how we can can configure redirects in the angular 2 router co ...
- numpy 高阶函数 —— np.histogram
np.diff(a, n=1, axis=-1):n 表示差分的阶数: >> x = np.array([1, 2, 4, 7, 0]) >> np.diff(x) array ...
- 【习题 3-6 UVA - 232】Crossword Answers
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 模拟题.注意场宽为3 [代码] #include <bits/stdc++.h> using namespace std ...
- [Nuxt] Update State with Vuex Actions in Nuxt.js
You can conditionally add classes to Vue.js templates using v-bind:class. This will help display the ...
- 新手MFC学习之Socket练习
事实上MFC这东西吧,好像也不光是MFC,非常多东西,事实上我如今才感觉到,假设想高速做一个东西出来的话.是没有必要系统的学关于这个东西的所有知识的.比方我想做一个MFC相似QQ的软件,可是我又不想花 ...
- 关于Topsort
Long time no see. 拓扑排序 英文名称:Topological-sort 别称:toposort or topsort 拓扑排序是干什么的呢 对一个有向无环图(Directed Ac ...