Android - app crashes when using a signed APK
<p>I am trying to get a signed APK for my Android app. The app works perfectly when I install it through Android studio but when I generate a signed APK and install the app using that APK I get the following exception. Any idea on what could be going on?</p>

<pre><code>    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.app.test/com.app.test.activities.MenuActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equalsIgnoreCase(java.lang.String)' on a null object reference
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2358)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2420)
            at android.app.ActivityThread.access$900(ActivityThread.java:154)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5292)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equalsIgnoreCase(java.lang.String)' on a null object reference
            at com.app.test.h.a.e(Unknown Source)
            at com.app.test.activities.MenuActivity.a(Unknown Source)
            at com.app.test.activities.MenuActivity.onCreate(Unknown Source)
            at android.app.Activity.performCreate(Activity.java:5990)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2311)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2420)
            at android.app.ActivityThread.access$900(ActivityThread.java:154)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5292)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
</code></pre>

<p>This is what the gradle build file looks like</p>

<pre><code>    buildscript {
    }
    apply plugin: 'com.android.application'

    android {
        compileSdkVersion 21
        buildToolsVersion "21.1.2"
        // that you installed in the SDK manager

        defaultConfig {
            applicationId "com.app.test"
            minSdkVersion 17
            targetSdkVersion 21
            versionCode 1
            versionName "1.0"
            multiDexEnabled true
        }
        buildTypes {
            release {
                minifyEnabled true
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }


    repositories {
        mavenCentral()
        flatDir {
            dirs 'libs'
        }

        maven { url 'http://maven.livotovlabs.pro/content/groups/public' }


    }

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.support:support-v4:21.0.3'
        compile 'com.google.android.gms:play-services:6.5.87'
        compile 'com.google.code.gson:gson:2.3.1'

        compile 'com.squareup.okhttp:okhttp:2.5.0'
        compile 'com.squareup.picasso:picasso:2.5.2'

    }
</code></pre>