2016-07-14 4 views
-3

Androidでアプリを開発しました。これはロリポップデバイスで正常に動作しますが、KitKatデバイスでクラッシュします。解決策を見つけるのを手伝ってください。アプリはLollipopで正常に動作しますが、KitKatでクラッシュします

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 19 
    buildToolsVersion '21.1.1' 
    defaultConfig { 
     applicationId "com.example.itsoft37.kitkat" 
     minSdkVersion 11 
     targetSdkVersion 19 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    compile 'com.android.support:appcompat-v7:19.1.0' 
} 

エラーは、残念ながら端末で停止しています。実行はタスクに失敗しました ':transformClassesWithDexForDebug:アプリ'

答えて

0

私はAPIバージョンを変更...

apply plugin: 'com.android.application' 

    android { 
     compileSdkVersion 19 
     buildToolsVersion '19.1.0' 

     defaultConfig { 
    applicationId "com.example.itsoft37.kitkat" 
    minSdkVersion 11 
    targetSdkVersion 19 
     } 

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

    dependencies { 
     compile fileTree(dir: 'libs', include: ['*.jar']) 
     compile 'com.android.support:appcompat-v7:19.1.0' 
    } 

このエラーが.. エラーが表示されます。

com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Multi dex requires Build Tools 21.0.0/Current: 19.1

+0

あなたはまだ例外が21.1.2 – Karthik

+0

を試してみてくださいまだ.. ..残念ながら停止.. – Karthik

+0

にbuildToolsVersionを変更する意味得れば、私はit..butてみdefaultconfigで真multiDexEnabledを追加し、 –

0

プラグインを適用する: 'com.android.application'

android { 
    compileSdkVersion 19 
    buildToolsVersion '19.1.0' 

    defaultConfig { 
applicationId "com.example.itsoft37.kitkat" 
minSdkVersion 11 
targetSdkVersion 19 

**multiDexEnabled true** 
    } 

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

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    compile 'com.android.support:appcompat-v7:19.1.0' 


    **compile 'com.android.support:multidex:1.0.1'** 
} 
関連する問題