Reputation: 163
In application I have an error:
Error:Execution failed for task
':buildPropTweakerPro:transformClassesWithInstantRunForDebug'.
> java.lang.RuntimeException: Method code too large!
but I don't have any classes, that was bigger than 64KB.
Gradle version, what I use, is 2.3.3
When I use gradle version 3.0.0 I have an error:
Error:Execution failed for task
':buildPropTweakerPro:transformClassesWithInstantRunForDebug'.
> java.lang.ClassFormatError (no error message)
My build.gradle file:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.24.4'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 26
buildToolsVersion '27.0.1'
defaultConfig {
applicationId "com.xxx"
minSdkVersion 16
versionCode 19
versionName "1.3.3"
multiDexEnabled true
}
dexOptions {
javaMaxHeapSize "8g"
}
lintOptions {
checkReleaseBuilds false
abortOnError true
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.startapp:inapp-sdk:3.6.6'
compile 'com.google.android.gms:play-services-ads:11.4.2'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:support-core-utils:26.1.0'
compile 'com.jakewharton:butterknife:8.6.0'
compile 'com.android.support.constraint:constraint-layout:1.0.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
}
I searched many questions on internet, but do not have any answers, but in the error, I do not have answer, in what file I have too large method.
Any advice?
Upvotes: 0
Views: 1842
Reputation: 4220
Just Enable Multidex
android {
defaultConfig {
// Enabling multidex support.
multiDexEnabled true
}
}
Upvotes: 1