ClassNotFoundException TwitterAuthException Failed to get request token


#1

==> I using Android studio 2.1, gradle:2.1.0
==> After build and run I got this errors only android 4.4. How can I fix it?
==>I also setting callback url on Twitter’s App developer
Class not found when unmarshalling: com.twitter.sdk.android.core.TwitterAuthConfig
java.lang.ClassNotFoundException: com.twitter.sdk.android.core.TwitterAuthConfig

Caused by: java.lang.NoClassDefFoundError: com/twitter/sdk/android/core/TwitterAuthConfig
Caused by: java.lang.ClassNotFoundException: Didn’t find class “com.twitter.sdk.android.core.TwitterAuthConfig” on path: DexPathList[[directory “.”],nativeLibraryDirectories=[/vendor/lib, /system/lib]]

com.twitter.sdk.android.core.TwitterApiException: Unable to resolve host “api.twitter.com”: No address associated with hostname

Authorization completed with an error
com.twitter.sdk.android.core.TwitterAuthException: Failed to get request token
at com.twitter.sdk.android.core.identity.OAuthController$1.failure

#proguard-rules{
-keep class io.fabric.sdk.android.** { ; }
-keep class com.twitter.sdk.android.
* { *; }
}

#build.gradle
apply plugin: 'com.android.application’
apply plugin: 'io.fabric’
buildscript {
repositories {
maven { url ‘https://maven.fabric.io/public’ }
}

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

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

android {
compileSdkVersion 23
buildToolsVersion “23.0.3”

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

}

dependencies {

compile('com.twitter.sdk.android:twitter:1.13.1@aar') {
    transitive = true;
}

}