My Android app is working fine on the emulator, and even on the device when I connect it using a USB cable. However, when I generate the apk file and share it with others, the app won't work. It crashes after the splash screen is launched.
Here is my app/build.gradle:
apply plugin: 'com.android.application'
android {
    compileSdkVersion 25
    buildToolsVersion '25.0.0'
    useLibrary 'org.apache.http.legacy'
    defaultConfig {
        applicationId 'com.test'
        minSdkVersion 15
        targetSdkVersion 22
        versionCode 2
        versionName "1.1"
        multiDexEnabled true
        def serverPropertiesFile = rootProject.file("server.properties")
        // Initialize a new Properties() object called keystoreProperties.
        def serverProperties = new Properties()
        // Load your keystore.properties file into the serverProperties object.
        serverProperties.load(new FileInputStream(serverPropertiesFile))
        buildConfigField("String", "HOST", serverProperties['SERVER_URL'])
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            debuggable true
        }
    }
    productFlavors {
    }
    lintOptions {
        abortOnError false
} } dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.daimajia.swipelayout:library:1.2.0@aar'
    compile 'com.daimajia.androidanimations:library:1.1.2@aar'
    compile 'com.google.android.gms:play-services-maps:10.0.1'
    compile 'com.google.android.gms:play-services-gcm:10.0.1'
    compile 'com.mcxiaoke.volley:library:1.0.19'
    compile 'com.google.code.gson:gson:2.8.2'
    compile 'com.android.support:recyclerview-v7:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
}
Manifest.xml:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!--
     The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
     Google Maps Android API v2, but you must specify either coarse or fine
     location permissions for the 'MyLocation' functionality. 
-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
Any help?