I got Error like

Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_74\bin\java.exe'' finished with non-zero exit value 2

when i m trying to add fabric plugin (Crashlytics and Digit) in my project. i don't get anything ... here is my gradle

 buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}



android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    dexOptions {
        javaMaxHeapSize "4g"
    }

    defaultConfig {
        applicationId "com.example.cuesoft_02.freedomtourismdemo"
        minSdkVersion 13
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile files('libs/android-query-full.0.26.7.jar')
     compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
            transitive = true;
        }
    compile 'com.android.support:appcompat-v7:23.2.1'
    compile 'com.android.support:design:23.2.1'
    compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
    compile 'com.google.android.gms:play-services:8.4.0'
    compile 'com.github.jorgecastilloprz:pagedheadlistview:1.0.1'
    compile 'com.mcxiaoke.viewpagerindicator:library:2.4.1'
    compile 'com.google.android.gms:play-services-gcm:8.4.0'
      compile('com.digits.sdk.android:digits:1.10.3@aar') {
            transitive = true;
        }
}

My 'lib' folder including only one .jar file that is aQuery now how can i solve this issue ??

also gradle building is become very slow after adding that Fabric(Crashlytics and Digit)plugin.

also tried to replace JDK versions from JDK 8 to JDK 7 but nothing change so i again relace it with JDK 8.

thanks in adwance

Edited I successfully add Fabric and Crashlytics. There was a conflicting library of ViewpagerIndicator . i simply remove it's dependency and add fabric with crashlytics till digits not work. now , issue is it works sometime smoothly and sometimes going to crash . can't understand its behaviour. my error code and actual code of start file are as below .remaining files are as it is.

Logcat

05-12 16:50:51.383 144-1049/? E/AudioMTKHardware: setParameters() still have param.size() = 1, remain param = "screen_state=off"
05-12 16:52:07.950 32464-32464/? E/cutils-trace: Error opening trace file: No such file or directory (2)
05-12 16:52:08.114 32464-32464/? E/memtrack: Couldn't load memtrack module (No such file or directory)
05-12 16:52:08.114 32464-32464/? E/android.os.Debug: failed to load memtrack module: -2
05-12 16:52:15.711 32483-32483/? E/cutils-trace: Error opening trace file: No such file or directory (2)
05-12 16:52:22.407 32495-32495/? E/cutils-trace: Error opening trace file: No such file or directory (2)
05-12 16:52:22.595 32495-32495/? E/memtrack: Couldn't load memtrack module (No such file or directory)
05-12 16:52:22.595 32495-32495/? E/android.os.Debug: failed to load memtrack module: -2
05-12 16:52:22.780 32517-32517/? E/GMPM: GoogleService failed to initialize, status: 10, Missing an expected resource: 'R.string.google_app_id' for initializing Google services.  Possible causes are missing google-services.json or com.google.gms.google-services gradle plugin.
05-12 16:52:22.780 32517-32517/? E/GMPM: Scheduler not set. Not logging error/warn.
05-12 16:52:22.788 32517-32533/? E/GMPM: Uploading is not possible. App measurement disabled
05-12 16:52:22.817 32517-32517/? E/dalvikvm: Could not find class 'io.fabric.sdk.android.services.persistence.PreferenceStoreImpl', referenced from method com.crashlytics.android.beta.Beta.doInBackground
05-12 16:52:22.823 32517-32517/? E/dalvikvm: Could not find class 'com.crashlytics.android.core.CrashlyticsPinningInfoProvider', referenced from method com.crashlytics.android.core.CrashlyticsCore.setAndValidateKitProperties
05-12 16:52:22.823 32517-32517/? E/dalvikvm: Could not find class 'io.fabric.sdk.android.services.network.DefaultHttpRequestFactory', referenced from method com.crashlytics.android.core.CrashlyticsCore.setAndValidateKitProperties
05-12 16:52:22.825 32517-32517/? E/dalvikvm: Could not find class 'io.fabric.sdk.android.services.persistence.FileStoreImpl', referenced from method com.crashlytics.android.core.CrashlyticsCore.getSdkDirectory
05-12 16:52:22.827 32517-32517/? E/dalvikvm: Could not find class 'io.fabric.sdk.android.services.persistence.FileStoreImpl', referenced from method com.crashlytics.android.core.CrashlyticsCore.onPreExecute
05-12 16:52:22.828 32517-32517/? E/dalvikvm: Could not find class 'io.fabric.sdk.android.services.persistence.PreferenceStoreImpl', referenced from method com.crashlytics.android.core.CrashlyticsCore.setShouldSendUserReportsWithoutPrompting
05-12 16:52:22.829 32517-32517/? E/dalvikvm: Could not find class 'io.fabric.sdk.android.services.persistence.PreferenceStoreImpl', referenced from method com.crashlytics.android.core.CrashlyticsCore.shouldSendReportsWithoutPrompting
05-12 16:52:22.850 32517-32517/? E/dalvikvm: Could not find class 'io.fabric.sdk.android.services.persistence.PreferenceStoreImpl', referenced from method io.fabric.sdk.android.services.common.AdvertisingInfoProvider.<init>
05-12 16:52:22.857 32517-32517/? E/AndroidRuntime: FATAL EXCEPTION: main
                                                   Process: com.example.cuesoft_02.freedomtourismdemo, PID: 32517
                                                   java.lang.NoClassDefFoundError: io.fabric.sdk.android.services.persistence.PreferenceStoreImpl
                                                       at io.fabric.sdk.android.services.common.AdvertisingInfoProvider.<init>(AdvertisingInfoProvider.java:37)
                                                       at io.fabric.sdk.android.services.common.IdManager.<init>(IdManager.java:113)
                                                       at io.fabric.sdk.android.Fabric$Builder.build(Fabric.java:259)
                                                       at io.fabric.sdk.android.Fabric.with(Fabric.java:311)
                                                       at com.example.cuesoft_02.freedomtourismdemo.Start.onCreate(Start.java:43)
                                                       at android.app.Activity.performCreate(Activity.java:5264)
                                                       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088)
                                                       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2302)
                                                       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
                                                       at android.app.ActivityThread.access$800(ActivityThread.java:151)
                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
                                                       at android.os.Handler.dispatchMessage(Handler.java:110)
                                                       at android.os.Looper.loop(Looper.java:193)
                                                       at android.app.ActivityThread.main(ActivityThread.java:5299)
                                                       at java.lang.reflect.Method.invokeNative(Native Method)
                                                       at java.lang.reflect.Method.invoke(Method.java:515)
                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825)
                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:641)
                                                       at dalvik.system.NativeStart.main(Native Method)
05-12 17:00:01.116 658-673/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:02.921 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:02.923 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:02.924 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:02.924 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:03.061 1366-1366/? E/Finsky: [1] com.google.android.finsky.wear.bh.a(742): onConnectionFailed: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
05-12 17:00:04.018 1366-32615/? E/CursorLeakDetecter: bad request for cursor:1110748224.
05-12 17:00:04.155 1366-1398/? E/CursorLeakDetecter: bad request for cursor:1109105808.
05-12 17:00:04.244 1366-1398/? E/CursorLeakDetecter: bad request for cursor:1112561400.
05-12 17:00:04.244 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:04.245 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:04.277 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:04.277 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:04.395 31086-32619/? E/NativeCrypto: ssl=0x60bab618 cert_verify_callback x509_store_ctx=0x604bb938 arg=0x0
05-12 17:00:04.395 31086-32619/? E/NativeCrypto: ssl=0x60bab618 cert_verify_callback calling verifyCertificateChain authMethod=ECDHE_ECDSA
05-12 17:00:04.821 31086-32619/? E/NativeCrypto: ssl=0x63e4e6f8 cert_verify_callback x509_store_ctx=0x604bb938 arg=0x0
05-12 17:00:04.822 31086-32619/? E/NativeCrypto: ssl=0x63e4e6f8 cert_verify_callback calling verifyCertificateChain authMethod=ECDHE_RSA
05-12 17:00:05.023 1366-1398/? E/CursorLeakDetecter: bad request for cursor:1107869536.
05-12 17:00:05.038 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:05.039 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:05.073 1366-1398/? E/CursorLeakDetecter: bad request for cursor:1111879240.
05-12 17:00:05.083 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:05.083 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:06.591 1366-1398/? E/CursorLeakDetecter: bad request for cursor:1110725504.
05-12 17:00:06.603 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:06.604 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:06.623 1366-1398/? E/CursorLeakDetecter: bad request for cursor:1112393720.
05-12 17:00:06.636 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:06.637 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:07.065 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:07.066 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:07.096 1366-1398/? E/CursorLeakDetecter: bad request for cursor:1106145344.
05-12 17:00:07.288 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:07.289 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:13.463 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:13.463 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:13.464 658-658/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History>
05-12 17:00:13.556 1136-1136/? E/NetworkScheduler.SchedulerReceiver: Invalid parameter app
05-12 17:00:13.556 1136-1136/? E/NetworkScheduler.SchedulerReceiver: Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
05-12 17:00:15.892 1136-1136/? E/NetworkScheduler.SchedulerReceiver: Invalid parameter app
05-12 17:00:15.892 1136-1136/? E/NetworkScheduler.SchedulerReceiver: Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
05-12 17:00:53.944 1456-3971/? E/ctxmgr: [TimeFilter.Builder]startTimeMillis must be >= 0.  Clamping to 0.

mainactivity.java

package com.example.cuesoft_02.freedomtourismdemo;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import io.fabric.sdk.android.Fabric;
import com.crashlytics.android.Crashlytics;
//import com.digits.sdk.android.Digits;
//import com.twitter.sdk.android.core.TwitterAuthConfig;
//import com.twitter.sdk.android.core.TwitterCore;






public class Start extends AppCompatActivity {

    // Note: Your consumer key and secret should be obfuscated in your source code before shipping.
//    private static final String TWITTER_KEY = "UMNnVDb38Vazx64QHrUnOZSRC";
//    private static final String TWITTER_SECRET = "Nz4tFuXnnSBuueyc5au1ek6eoyWdWc97rIJmHUjyesJM5yyE6j";


    // Note: Your consumer key and secret should be obfuscated in your source code before shipping.
    private static final String TWITTER_KEY = "ArKEkvmilnF9zWxiOs7ouZFbh";
    private static final String TWITTER_SECRET = "3BprPxwy6Quc5uozP50RIwDxbDgrdrBdGMLIJfx7UMZHtaWc23";


    // Note: Your consumer key and secret should be obfuscated in your source code before shipping.
//    private static final String TWITTER_KEY = "ArKEkvmilnF9zWxiOs7ouZFbh";
//    private static final String TWITTER_SECRET = "3BprPxwy6Quc5uozP50RIwDxbDgrdrBdGMLIJfx7UMZHtaWc23";

    private SharedPreferences prefs;
    private SharedPreferences unique_prefs, guest_name,app_userId;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET);
//        Fabric.with(this, new Crashlytics(), new TwitterCore(authConfig), new Digits());

        Fabric.with(this, new Crashlytics());
        setContentView(R.layout.activity_start);
//        Fabric.with(this, new Crashlytics());
//         TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET);
//         Fabric.with(this, new Crashlytics(), new TwitterCore(authConfig), new Digits());
        final GlobalClass globalVariable = (GlobalClass) getApplicationContext();
        Thread timerThread = new Thread() {
            public void run() {
                try {
                    sleep(3000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                } finally {
                    int AppUserId=0, trip = 0;
                    String name = "";
//                    prefs = getSharedPreferences("report", MODE_PRIVATE);
                    /*if (prefs == null) {
                        app = 0;
                    } else {
                    AppUserId=app_userId.getInt("AppUserId",0);
                        app = prefs.getInt("IsAppInstall", 0);
                    }*/
                    app_userId = getSharedPreferences("freedom", MODE_PRIVATE);
                    // AppUserId=app_userId.("AppUserId",0);
                    AppUserId = Integer.parseInt(globalVariable.GetAppUserId());
                    if (AppUserId == 0) {
                        startActivity(new Intent(Start.this, SplashScreen.class));

                    } else {
                        unique_prefs = getSharedPreferences("freedom", MODE_PRIVATE);
                        guest_name = getSharedPreferences("freedom", MODE_PRIVATE);
                        trip = unique_prefs.getInt("UniqueTripNo", 0);
                        name = guest_name.getString("Guestname", "");
                        if (trip == 0) {
                            startActivity(new Intent(Start.this, MainActivity.class));
                            /*if (name == "") {
                                startActivity(new Intent(Start.this, SignUp.class));
                            } else {
                                startActivity(new Intent(Start.this, MainActivity.class));
                            }*/

                        } else {


                            startActivity(new Intent(Start.this, Home.class).putExtra("TripId", String.valueOf(trip)));

                        }
                    }




                }
            }
        };
        timerThread.start();


    }

    @Override
    protected void onPause() {
        // TODO Auto-generated method stub
        super.onPause();
        finish();
    }

}

Can't understand what to do??

0

There are 0 answers