2016-04-10 9 views
-1

私は、モバイルデバイス上で自分のアプリケーションを実行しようとすると、私はこのエラーを取得しています:AndroidのJavaのLANG NoClassDefFoundErrorがCaldroid

java.lang.NoClassDefFoundError: com.roomorama.caldroid.CalendarHelper 
at com.roomorama.caldroid.CaldroidFragment.retrieveInitialArgs(CaldroidFragment.java:1087)... 

それは私がエミュレータ上でアプリケーションを実行すると、それが動作することは興味深いです。

ここで、俺のbuild.gradleの依存関係:

dependencies { 
compile fileTree(dir: 'libs', include: ['*.jar']) 
testCompile 'junit:junit:4.12' 
compile 'com.android.support:appcompat-v7:23.1.1' 
compile 'com.android.support:design:23.1.1' 
compile 'com.roomorama:caldroid:3.0.1' 
compile 'com.google.android.gms:play-services-identity:8.4.0' 
compile 'com.firebase:firebase-client-android:2.3.1' 
compile 'com.google.android.gms:play-services-gcm:8.4.0' 
compile 'com.facebook.android:facebook-android-sdk:4.5.0' 
compile 'com.google.android.gms:play-services-base:8.4.0' 
compile 'com.google.android.gms:play-services-location:8.4.0' 
compile 'com.google.android.gms:play-services-plus:8.4.0' 
compile 'com.android.support:support-v4:23.1.1' 
compile('com.google.api-client:google-api-client-android:1.20.0') { 
    exclude group: 'org.apache.httpcomponents' 
} 
compile('com.google.apis:google-api-services-calendar:v3-rev125-1.20.0') { 
    exclude group: 'org.apache.httpcomponents' 
}} 

答えて

0

を私はbuild.gradleファイルでfalseにmultiDexEnabledを設定する必要がありましたように見えます。

multiDexEnabled false 
0

おそらくコンパイラまたはProGuardの問題です。私はあなたがデバイス上のリリースバージョンを使用していると仮定し、何らかの理由で、コンパイラまたはProGuardは、CalendarHelperクラスが(おそらくリフレクションの使用のために)必要ではないと考え、リリースバージョンから取り除いています。 ProGuardファイルに-keepディレクティブを追加してみてください。

関連する問題