1.找到 build.gradle 用记事本打开,修改如下:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0' // 我的以前为 2.1.2 ,修改这个地方 // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
} allprojects {
repositories {
jcenter()
}
} task clean(type: Delete) {
delete rootProject.buildDir
}

2.找到 gradle-wrapper.properties 修改如下:

#Mon Dec  :: PST
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip // 这个地方要看你的最新版的配置了,我的以前的为 gradle-2.10-all.zip

3.找到 app\build.gradle 用记事本打开,修改如下:

apply plugin: 'com.android.application'

android {
compileSdkVersion
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.example.administrator.myapplication"
minSdkVersion
targetSdkVersion
versionCode
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
} dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:design:25.0.0'
testCompile 'junit:junit:4.12'
}

当然,如果你不知道自己的配置的话,可以新建一个空项目,然后查看相应文件的配置后更改

Android 升级到Android Studio2.2 后打不开以前版本的项目的更多相关文章

  1. Android 升级到android studio 2.2项目死活run不起来

    背景:升级到Android studio 2.2项目死活运行不起来 现象如下: run with --stacktrace --debug等等抛出的bug简直无法忍视 解决办法:把compileSdk ...

  2. 【Android Studio安装部署系列】三十、从Android studio2.2.2升级到Android studio3.0之路

    版权声明:本文为HaiyuKing原创文章,转载请注明出处! 前言 Android Studio 3.0的新功能 https://mp.weixin.qq.com/s/2XmVG4mKEDX6-bvZ ...

  3. 升级完Android Studio3.2后,打包release出现的错误

    升级完Android Studio2.3后,打包release出现的错误 Error:Execution failed for task ':qq:lintVitalRelease'.> Lin ...

  4. 【Android Studio安装部署系列】三十五、从Android studio3.0.1升级到Android studio3.1.4【以及创建android p模拟器的尝试(未成功)】

    版权声明:本文为HaiyuKing原创文章,转载请注明出处! 概述 因为想要使用Android P模拟器,所以需要将Android Studio升级到3.1版本以上. Android P模拟器的最低版 ...

  5. Android 升级安装APK兼容Android7.0,解决FileUriExposedException

    我们在开发app时避免不了需要添加应用内升级功能.当app启动时,如果检测到最新版本,将apk安装包从服务器下载下来,执行安装.安装apk的代码一般写法如下,网上随处可以搜到 public stati ...

  6. 升级到Android Studio3.x遇到的问题及解决方案

    升级到Android Studio3.x遇到的问题及解决方案 转 https://www.2cto.com/kf/201711/695736.html 升级到Android Studio3.0遇到的问 ...

  7. android 升级APK

    Intent intent = new Intent(); //执行动作 intent.setAction(Intent.ACTION_VIEW); //执行完打开应用 intent.setFlags ...

  8. Android 升级下载 它们的定义Updates 兼容版本

    Android 更新模块 它们的定义Update 写这个总结是由于在项目中碰到了Android系统兼容的BUG   Android项目原本使用的是API提供的下载方法   例如以下: Download ...

  9. 我的Android六章:Android中SQLite数据库操作

    今天学习的内容是Android中的SQLite数据库操作,在讲解这个内容之前小编在前面有一篇博客也是讲解了SQLite数据库的操作,而那篇博客的讲解是讲述了 如何在Window中通过DOM来操作数据库 ...

随机推荐

  1. 在VS中设置比较和谐的字体和颜色的方法

    作者:朱金灿 来源:http://blog.csdn.net/clever101 先在studiostyl.es网站选择你喜欢的字体方案,我个人比较喜欢这款: Humane Studio,注意在网页上 ...

  2. 判断移动端跳转,从移动端来的不跳转。利用localStorage保存状态,window.location.pathname跳转不同的url

    手机访问 www.yourdomain.com 跳转,从m.yourdomain.com来的不跳转. 访问www.yourdomain.com/category8, 跳转到m.yourdomain.c ...

  3. hdu5387 Clock

    Problem Description Give a time.(hh:mm:ss).you should answer the angle between any two of the minute ...

  4. Moodle 中文 API 之 文件管理API

    File API  文件管理 文件夹 1. 概述 2. 文件域 2.1 命名文件域 3. 提供文件给用户 4. 从用户那获取文件 5. 样例 5.1 浏览文件 5.2 移动文件 5.3 文件列表 5. ...

  5. [JWT] JWT Signature With RS256 - Learn The Advantages Compared to HS256

    The advantage of RS256 over HS256 is RS256 no longer need to share the secret key between client and ...

  6. xcode6.3 模版位置

    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templ ...

  7. 自定义HTML标签属性

    为HTML元素添加一自定义的属性非常方便,只须将其加到尖括号中即可,与内置属性地位相等. 如我们要为TextBox元素添加属性idvalue: <input type="text&qu ...

  8. 自己动手开发jQuery插件全面解析 jquery插件开发方法

    jQuery插件的开发包括两种: 一种是类级别的插件开发,即给jQuery添加新的全局函数,相当于给jQuery类本身添加方法.jQuery的全局函数就是属于jQuery命名空间的函数,另一种是对象级 ...

  9. cocos2dx--vs2012+lua开发环境搭建

    cocos2dx版本号:cocos2dx2.2.3 lua插件:babelua 1.5.3  下载地址:http://pan.baidu.com/s/1i3mPD8h 第一步:先关闭vs,双击下载下来 ...

  10. 编程一一C语言的问题,cpu中的专用寄存器