gpt4 book ai didi

android-studio - 从Eclipse导入项目到Studio时发生Gradle错误

转载 作者:行者123 更新时间:2023-12-03 17:55:23 27 4
gpt4 key购买 nike

我正在尝试将eclipse项目导入Android studio.SO,因此我删除了所有GCM代码并为FCM创建代码。但是当我创建Build APK时,它显示如下错误

Error:UNEXPECTED TOP-LEVEL ERROR:
Error:java.lang.OutOfMemoryError: GC overhead limit exceeded
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException


我的gradle文件包含以下依赖项和库。

apply plugin: 'com.android.application'
android {
useLibrary 'org.apache.http.legacy'
compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
applicationId "mi.nashik.online"
minSdkVersion 15
targetSdkVersion 23
versionCode 16
versionName "1.9.6"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile ('com.android.support:appcompat-v7:23.4.0')
{
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
exclude group: 'com.android.support'
exclude group: 'com.android.support', module: 'support-v4'
}
compile ('com.google.android.gms:play-services:9.0.2'){
exclude group: 'com.android.support'
exclude group: 'com.google.guava'
}
compile 'com.google.code.gson:gson:2.1'
compile 'com.google.protobuf:protobuf-java:2.2.0'
compile files('libs/google-api-client-1.10.3-beta.jar')
compile files('libs/google-api-client-android2-1.10.3-beta.jar')
compile files('libs/google-http-client-1.10.3-beta.jar')
compile files('libs/google-http-client-android2-1.10.3-beta.jar')
compile files('libs/google-oauth-client-1.10.1-beta.jar')
compile files('libs/jackson-core-asl-1.9.4.jar')
compile files('libs/jsr305-1.3.9.jar')
compile files('libs/library-1.2.2.jar')
compile 'com.squareup.picasso:picasso:2.5.0'
compile files('libs/slider.jar')
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.firebase:firebase-analytics:9.0.2'
compile ('com.google.firebase:firebase-core:9.0.2')
{
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}
compile ('com.google.firebase:firebase-messaging:9.0.2'){
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}
compile files('libs/universal-image-loader-1.9.3-SNAPSHOT.jar')
compile files('libs/urlimageviewhelper-1.0.4.jar')
}
apply plugin: 'com.google.gms.google-services'

最佳答案

通过更新您的gradle.properties文件
org.gradle.jvmargs=-Xms256m -Xmx1024m

关于android-studio - 从Eclipse导入项目到Studio时发生Gradle错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41037806/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com