The Android application fails when running at the beginning of the application

advertisements

The app went to crash when run at beginning of the app. The below crashing issues that i have mentioned here as just shown when i put manually app-debug.apkfile in mobile device after installing part was over. But in case of while running the application through the android studio it will working fine. No crashing point will point out.

One more thing is, i have added all Activities in my application manifest.

Android RuneTime Exception:

FATAL EXCEPTION: main

                                                                       Process: com.interfinet.jobtree, PID: 23960
                                                                            java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.interfinet.jobtree/com.interfinet.jobtree.SplashScreen}: java.lang.ClassNotFoundException: Didn't find class "com.interfinet.jobtree.SplashScreen" on path: DexPathList[[zip file "/data/app/com.interfinet.jobtree-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
                                                                                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2250)
                                                                                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413)
                                                                                at android.app.ActivityThread.access$800(ActivityThread.java:155)
                                                                                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317)
                                                                                at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                at android.os.Looper.loop(Looper.java:135)
                                                                                at android.app.ActivityThread.main(ActivityThread.java:5343)
                                                                                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:905)
                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
                                                                             Caused by: java.lang.ClassNotFoundException: Didn't find class "com.interfinet.jobtree.SplashScreen" on path: DexPathList[[zip file "/data/app/com.interfinet.jobtree-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
                                                                                at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
                                                                                at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
                                                                                at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
                                                                                at android.app.Instrumentation.newActivity(Instrumentation.java:1089)
                                                                                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2240)
                                                                                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413)
                                                                                at android.app.ActivityThread.access$800(ActivityThread.java:155)
                                                                                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317)
                                                                                at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                at android.os.Looper.loop(Looper.java:135)
                                                                                at android.app.ActivityThread.main(ActivityThread.java:5343)
                                                                                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:905)
                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
                                                                                Suppressed: java.lang.ClassNotFoundException: com.interfinet.jobtree.SplashScreen
                                                                                at java.lang.Class.classForName(Native Method)
                                                                                at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
                                                                                at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
                                                                                at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
                                                                                        ... 13 more
                                                                             Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
    05-11 17:53:51.758 23960-23960/com.interfinet.jobtree I/Process: Sending signal. PID: 23960 SIG: 9

app.gradle file:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.0'

    defaultConfig {
        applicationId "com.interfinet.jobtree"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true

    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    aaptOptions {
        additionalParameters "--no-version-vectors"
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project(':linkedin-sdk')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.android.support:recyclerview-v7:25.3.1'
    compile 'com.android.support:cardview-v7:25.3.1'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'com.mikhaellopez:circularimageview:3.0.2'
    compile 'com.google.android.gms:play-services-maps:8.4.0'
    compile 'com.google.android.gms:play-services-location:8.4.0'
    compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
    compile 'com.jaredrummler:material-spinner:1.1.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.android.support:multidex:1.0.0'
    compile 'com.facebook.android:facebook-android-sdk:4.0.0'
    compile 'com.wdullaer:materialdatetimepicker:3.1.3'
    compile 'at.blogc:expandabletextview:1.0.3'
}

Manifest.xml file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.interfinet.jobtree">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/app_luncher_logo11"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme.NoActionBar">
        <activity
            android:name=".SplashScreen"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".OnboardActivity"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme.NoActionBar" />
        <activity
            android:name=".CredentialActivity"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme.Login"
            android:windowSoftInputMode="stateHidden|adjustResize" />
    </application>

</manifest>


remove multiDexEnabled true from gradle file and try