我收到以下错误:
错误:任务':app:mergeDebugResources'执行失败。 java.lang.OutOfMemoryError:无法创建新的本机线程
这是我的项目gradle文件
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion '21.1'
defaultConfig {
applicationId "my.app.id"
minSdkVersion 15
targetSdkVersion 19
versionCode 7
versionName "7.00"
// multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
pickFirst 'META-INF/license.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/MANIFEST.MF'
}
lintOptions {
checkReleaseBuilds false
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:support-v4:21.0'
compile 'com.github.chrisbanes:PhotoView:1.3.0'
compile 'com.google.android.gms:play-services-maps:9.4.0'
// compile 'com.android.support:multidex:1.0.0'
compile files('libs/acra-4.5.0.jar')
compile files('libs/commons-io-2.4.jar')
compile files('libs/IDTuniMagSDKAndroid.jar')
compile files('libs/maps.jar')
compile files('libs/picasso-2.5.2.jar')
compile files('libs/numberpickerlib.jar')
compile files('libs/PdfViewer.jar')
// compile files('libs/httpmime-4.0.jar')
compile files('libs/apache-mime4j-0.6.jar')
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.squareup.okio:okio:1.10.0'
compile 'com.leo.simplearcloader:simplearcloader:1.0.+'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
compile 'io.reactivex:rxandroid:1.0.1'
compile 'com.akexorcist:RoundCornerProgressBar:2.0.3'
compile 'com.github.jakob-grabner:Circle-Progress-View:v1.2.9'
}
这是应用构建gradle文件
UTF-8
我在构建项目时遇到此错误。因此,我也无法运行该项目。甚至在模拟器中安装APK之前就会发生这种情况。
提前致谢。
答案 0 :(得分:0)
您似乎清理了您的项目。在build.gradle
dexOptions {
javaMaxHeapSize "4g"
}