0

I have a problem when I try to run my application on android device that uses API level 19 (Android 4.4.2). When I run the app on API>21 it works perfectly fine.

The errors I'm getting: enter image description here

I tried setting buildToolsVersion to 19.1.0 instead of 23.0.3 but then I can't use MultiDex and I can't build the app without it.

here is my build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 19
    buildToolsVersion '23.0.3'

    defaultConfig {
        applicationId "multisoft.testsurfaceview"
        minSdkVersion 19
        targetSdkVersion 19
        versionCode 1
        multiDexEnabled true
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    dexOptions {
        javaMaxHeapSize "4g"
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:19.0.0'
    compile files('/Users/admin/Desktop/Projects/testsurfaceview/libs/classes.jar')
}

I can't seem to find where the problem could be, any suggestions?

Mister M
  • 1,539
  • 3
  • 17
  • 37

2 Answers2

1

remove this compile files('/Users/admin/Desktop/Projects/testsurfaceview/libs/cl‌​asses.jar') from dependencies.

And just add the jar in libs folder and tried it..

karthickraja
  • 214
  • 1
  • 7
0

see this link you will find your answer. basically you did not configure multidex properly. enter link description here

Community
  • 1
  • 1
dipankar
  • 11
  • 4