Android ClassCircularityError - PullRequest
       85

Android ClassCircularityError

0 голосов
/ 19 февраля 2020

Я получаю ClassCircularityError при запуске моего приложения. Кажется, он появляется после того, как я добавил

implementation 'com.google.android.play:core:1.6.5'

в мой файл уровня приложения. Вот моя трассировка стека:

Fatal Exception: java.lang.ClassCircularityError: Class byte extends itself (declaration of 'byte' appears in base.apk!classes3.dex)
       at dalvik.system.DexFile.defineClassNative(DexFile.java)
       at dalvik.system.DexFile.defineClass(DexFile.java:282)
       at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:275)
       at dalvik.system.DexPathList$Element.findClass(DexPathList.java:677)
       at dalvik.system.DexPathList.findClass(DexPathList.java:466)
       at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:123)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:312)

Cra sh появляется на этом куске кода:

    public void onCreate() {
        super.onCreate();
        .......................
        db = Room.databaseBuilder(getApplicationContext(),
                AppDatabase.class, "database-name")
                .fallbackToDestructiveMigration()
                .build(); // on this line
.............................

Также она появляется в другом месте, просто в первой строке активности запуска onCreate ( ) метод.

Вот весь мой список зависимостей:

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')

    // Required for local unit tests (JUnit 4 framework)
    implementation "com.android.support:support-v4:28.0.0"
    testImplementation 'junit:junit:4.12'
    testImplementation 'org.mockito:mockito-core:2.17.0'

    //Room
    implementation "android.arch.persistence.room:runtime:1.1.1"
    kapt "android.arch.persistence.room:compiler:1.1.1"

    // Required for instrumented tests
    androidTestImplementation "com.android.support:support-annotations:$supportVersion"
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    implementation 'com.afollestad.material-dialogs:core:0.9.5.0'

    //social networks
    implementation 'com.facebook.android:facebook-android-sdk:[5,6)'

    //support libs
    implementation 'com.android.support:multidex:1.0.3'
    implementation "com.android.support:appcompat-v7:28.0.0"
    implementation "com.android.support:cardview-v7:28.0.0"
    implementation "com.android.support:customtabs:28.0.0"
    implementation "com.android.support:recyclerview-v7:28.0.0"
    implementation "com.android.support:design:28.0.0"
    implementation "com.android.support:percent:28.0.0"

    //google libs
    implementation "com.google.firebase:firebase-messaging:17.4.0"
    implementation "com.google.firebase:firebase-core:16.0.7"
    implementation "com.google.android.gms:play-services-location:$googleVersion"
    implementation 'com.google.android.play:core:1.6.5'

    //cupboard
    implementation 'nl.qbusict:cupboard:2.2.0'
    implementation 'nl.littlerobots.cupboard-tools:gson:0.3.1'
    implementation 'com.github.smart-fun:XmlToJson:1.4.4'

    //rest
    implementation 'com.squareup.retrofit:retrofit:1.9.0'
    implementation 'com.squareup.okhttp:okhttp:2.7.0'
    implementation 'com.squareup.okhttp:okhttp-urlconnection:2.5.0'
    implementation 'io.reactivex:rxandroid:1.2.1'
    implementation 'io.reactivex:rxjava:1.3.1'

    //MVP
    implementation "com.arello-mobile:moxy:$moxyVersion"
    implementation "com.arello-mobile:moxy-app-compat:$moxyVersion"
    kapt "com.arello-mobile:moxy-compiler:$moxyVersion"

    //butter
    implementation "com.jakewharton:butterknife:$butterKnifeVersion"
    kapt "com.jakewharton:butterknife-compiler:$butterKnifeVersion"

    //animation
    implementation 'com.andkulikov:transitionseverywhere:1.7.6'
    implementation 'org.greenrobot:eventbus:3.1.1'
    implementation 'com.github.bumptech.glide:glide:4.8.0'
    kapt 'com.github.bumptech.glide:compiler:4.8.0'
    implementation 'joda-time:joda-time:2.9.9'
    implementation 'com.romandanylyk:pageindicatorview:0.2.0'
    implementation 'com.github.markomilos:paginate:0.5.1'
    implementation 'com.splunk.mint:mint:5.0.0'
    implementation 'androidmads.library.qrgenearator:QRGenearator:1.0.3'
    implementation group: 'com.jakewharton.rxrelay', name: 'rxrelay', version: '1.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
    implementation('com.journeyapps:zxing-android-embedded:3.6.0') { transitive = false }
    implementation 'com.journeyapps:zxing-android-embedded:3.2.0@aar'
    implementation 'me.relex:circleindicator:1.2.2@aar'
    implementation 'com.birbit:android-priority-jobqueue:2.0.1'
    implementation 'com.makeramen:roundedimageview:2.3.0'
    implementation 'com.github.jakob-grabner:Circle-Progress-View:v1.3'
    implementation 'com.github.javiersantos:BottomDialogs:1.2.1'
    implementation 'com.github.zcweng:switch-button:0.0.3@aar'
    implementation 'jp.wasabeef:blurry:2.1.1'
    implementation 'co.infinum:goldfinger:1.1.1'
    implementation 'co.infinum:goldfinger-rx:1.1.1'
    implementation "android.arch.work:work-runtime:1.0.1"
    implementation "ru.tinkoff.decoro:decoro:1.3.4"
    implementation 'com.facebook.stetho:stetho:1.5.0'
    implementation 'com.github.GoodieBag:Pinview:v1.3'
    implementation 'com.beust:klaxon:3.0.1'
    implementation 'com.jakewharton.rxbinding2:rxbinding:2.2.0'
    implementation('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
        transitive = true
    }
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
    implementation project(':bottom-navigation-bar-release')
    implementation 'com.google.android.gms:play-services-maps:16.1.0'
    implementation 'com.squareup.whorlwind:whorlwind:2.0.0'
    implementation 'com.google.maps.android:android-maps-utils:0.4.4'
    implementation 'com.bartoszlipinski:recyclerviewheader2:2.0.1'
    implementation group: 'org.simpleframework', name: 'simple-xml', version: '2.7'

    //App icon badge related library dependency
    implementation "me.leolin:ShortcutBadger:1.1.22@aar"

    implementation 'com.thoughtbot:expandablecheckrecyclerview:1.4'

    // Range seekbar library dependency
    compile 'com.crystal:crystalrangeseekbar:1.1.3'
    implementation 'android.arch.persistence.room:rxjava2:1.1.1'

    // Date and Time picker dialog
    implementation 'com.github.florent37:SingleDateAndTimePicker:v2.0.4'

}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...