构建渐变Android studio构建缓慢
我使用Android Studio构建我的Android应用程序。但我的笔记本电脑需要5分钟来构建应用程序。我不知道为什么。构建gradle总是太慢。以下是我的代码构建梯度:构建渐变Android studio构建缓慢,android,performance,gradle,build,Android,Performance,Gradle,Build,我使用Android Studio构建我的Android应用程序。但我的笔记本电脑需要5分钟来构建应用程序。我不知道为什么。构建gradle总是太慢。以下是我的代码构建梯度: apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' android { compileSdkVersion 23 buildToolsVersion '23.0.2'
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
repositories { mavenCentral() }
defaultConfig {
applicationId "thsoft.com.sosme"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.android.gms:play-services:8.1.0'
compile 'com.wang.avi:library:1.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.jakewharton:disklrucache:2.0.2'
compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.squareup.retrofit:converter-gson:2.0.0-beta2'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.crittercism:crittercism-android-agent:5.5.0-rc-1'
}
你能帮我解决这个问题吗?谢谢大家! 渐变代码没有问题,但依赖性太多。这取决于处理器的速度和内存。尝试获得8gb的内存,你就会没事了。根据官方网站,最低要求是4gb 安装最新的Android Studio 2.0预览版。这真是太棒了,它肯定会缩短gradle的构建时间。让我们尝试增加构建时间,您只需要增加RAM 并在gradle文件中删除那些不需要的依赖项 你使用了巨大的游戏服务。如果您使用的是谷歌云消息,请使用com.Google.android.gms:play services gcm:8.3.0。肯定会减少你的构建时间。不要把整个播放服务。具体说明您使用的播放服务 此链接可能对您有所帮助
祝您好运尝试启用脱机模式以忽略最新检查: 或将生成类型更改为调试: 构建变量->调试(左下角为)
格卢克 我的版本是1.5。我没有在help/check UpdateEyes上找到2.0版,因为它只是供开发人员预览的。你可以从这里下载。是操作系统也是影响安卓系统性能的问题吗,操作系统真的不要紧,但RAM和前身呢matter@DươnguyễnVăn可能会对您有所帮助,检查url,但我认为mac和linux操作系统可以比其他操作系统更快地构建GladelWindows@DươnguyễnVăn如果您使用过谷歌地图v2,那么您可以使用com.google.android.gms:play services地图:8.3.0