-6

i have created an android app and has created its .apk file as well. when i run the app in my phone having LOLLIPOP (API level 21) android os it runs perfectly but when i run it on lower versions like android KITKAT (API Level 19) it stops and throws error "unfortunately the app has stopped" i have set the minsdkversion to 15 still i get the error. I am using android studio and below is the gradle file

Build.gradle (app level)

apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion '19.1.0'

defaultConfig {
    applicationId "com.bactrack.backtrack_mobile.bactrackandroidsdkdemo"
    minSdkVersion 15
    targetSdkVersion 21
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

android.packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}

dependencies {
// compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/BACTrackSDK.jar')
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.google.android.gms:play-services:7.5.0'
compile 'org.apache.httpcomponents:httpmime:4.3.6'
compile 'org.apache.httpcomponents:httpcore:4.3.2'
}

Please suggest what is wrong with it...thanks for sharing knowledge

Pawan Rawat
  • 495
  • 1
  • 7
  • 25

1 Answers1

1

there may be errors in creating activity, NULL_POINTER especially. provide error log or code.

ThatsME
  • 147
  • 7