Android studio开发工具使用过程中常见的错误及解决方法:


问题一、
Error:(16, 0) Gradle DSL method not found: 'android()'
Possible causes:The project 'HandlerDemo' 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>

解决方案:
将Project最外层build.gradle中的 android{}项去掉,然后再执行build->Rebuild project。
如果还不行,可将Project中app层的android{}中的compileSdkVersion buildToolsVersion 分别修改你说编译的sdk及toolversion,然后再执行build->Rebuild project。



问题二、
Gradle error “Attribute ”xxx“ has already been defined” in Android Studio

解决方案:
移除build.gradle中的compile 'com.android.support:appcompat-v7:23.2.1'

更多相关文章

  1. android下mm模块出现编译错误问题
  2. swig android的使用
  3. TabLayout 设置指示器宽度问题
  4. Android(安卓)installed app, never used, cannot receiver Broa
  5. Android中Toast重复显示问题解决
  6. android string.xml %问题。
  7. android部分BUG
  8. Android-8.1.0编译问题汇总
  9. Android(安卓)Studio 搭建 + 第一个helloworld过程中遇到的问题

随机推荐

  1. android 开发之旅, should use @string r
  2. Android(安卓)EventBus 源码解析
  3. 调用Android自带的联系人选择界面
  4. 我想邀请你和我一起学Android
  5. Android延长Toast的时间
  6. 单独编译android framework模块出现的问
  7. android 界面布局 很好的一篇总结 【转】
  8. Android布局(layout)
  9. android onSaveInstanceState方法 横坚屏
  10. TP vue组合api-绑定事件\组件\通信\路