Android Logcat消息"无法找到Class"

时间:2016-04-16 15:47:01

标签: android

我已将降级后的编译SDK从API 23降级到API 22我在logcat中收到以下消息。

需要您帮助减少错误。 我已经用gradle app文件更新了这个问题

    04-16 20:36:35.814 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.example.arsal.androtasbih.SplashScreen.access$super
04-16 20:36:35.814 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.example.arsal.androtasbih.SplashScreen.access$super
04-16 20:36:35.814 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.media.session.MediaController', referenced from method com.example.arsal.androtasbih.SplashScreen.access$super
04-16 20:36:35.814 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.widget.Toolbar', referenced from method com.example.arsal.androtasbih.SplashScreen.access$super
04-16 20:36:35.824 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.app.ActivityManager$TaskDescription', referenced from method com.example.arsal.androtasbih.SplashScreen.access$super
04-16 20:36:35.824 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.example.arsal.androtasbih.SplashScreen.access$super
04-16 20:36:35.824 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.example.arsal.androtasbih.SplashScreen.access$super
04-16 20:36:35.824 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.example.arsal.androtasbih.SplashScreen.access$super
04-16 20:36:35.844 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.example.arsal.androtasbih.SplashScreen.access$super
04-16 20:36:38.907 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.example.arsal.androtasbih.MainActivity.access$super
04-16 20:36:38.917 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.example.arsal.androtasbih.MainActivity.access$super
04-16 20:36:38.917 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.media.session.MediaController', referenced from method com.example.arsal.androtasbih.MainActivity.access$super
04-16 20:36:38.917 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.widget.Toolbar', referenced from method com.example.arsal.androtasbih.MainActivity.access$super
04-16 20:36:38.917 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.app.ActivityManager$TaskDescription', referenced from method com.example.arsal.androtasbih.MainActivity.access$super
04-16 20:36:38.927 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.example.arsal.androtasbih.MainActivity.access$super
04-16 20:36:38.927 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.example.arsal.androtasbih.MainActivity.access$super
04-16 20:36:38.937 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.example.arsal.androtasbih.MainActivity.access$super
04-16 20:36:38.947 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.example.arsal.androtasbih.MainActivity.access$super
04-16 20:36:58.376 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.example.arsal.androtasbih.ShowTasbeedandAddTasbeen.access$super
04-16 20:36:58.386 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.example.arsal.androtasbih.ShowTasbeedandAddTasbeen.access$super
04-16 20:36:58.386 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.media.session.MediaController', referenced from method com.example.arsal.androtasbih.ShowTasbeedandAddTasbeen.access$super
04-16 20:36:58.386 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.widget.Toolbar', referenced from method com.example.arsal.androtasbih.ShowTasbeedandAddTasbeen.access$super
04-16 20:36:58.386 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.app.ActivityManager$TaskDescription', referenced from method com.example.arsal.androtasbih.ShowTasbeedandAddTasbeen.access$super
04-16 20:36:58.386 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.example.arsal.androtasbih.ShowTasbeedandAddTasbeen.access$super
04-16 20:36:58.386 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.example.arsal.androtasbih.ShowTasbeedandAddTasbeen.access$super
04-16 20:36:58.386 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.example.arsal.androtasbih.ShowTasbeedandAddTasbeen.access$super
04-16 20:36:58.396 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.example.arsal.androtasbih.ShowTasbeedandAddTasbeen.access$super
04-16 20:37:02.069 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.example.arsal.androtasbih.TasbeehCounter.access$super
04-16 20:37:02.069 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.example.arsal.androtasbih.TasbeehCounter.access$super
04-16 20:37:02.079 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.media.session.MediaController', referenced from method com.example.arsal.androtasbih.TasbeehCounter.access$super
04-16 20:37:02.079 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.widget.Toolbar', referenced from method com.example.arsal.androtasbih.TasbeehCounter.access$super
04-16 20:37:02.079 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.app.ActivityManager$TaskDescription', referenced from method com.example.arsal.androtasbih.TasbeehCounter.access$super
04-16 20:37:02.079 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.example.arsal.androtasbih.TasbeehCounter.access$super
04-16 20:37:02.079 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.example.arsal.androtasbih.TasbeehCounter.access$super
04-16 20:37:02.089 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.example.arsal.androtasbih.TasbeehCounter.access$super
04-16 20:37:02.089 27855-27855/com.example.arsal.androtasbih E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.example.arsal.androtasbih.TasbeehCounter.access$super
04-16 20:37:28.415 27855-27855/com.example.arsal.androtasbih E/ViewRootImpl: sendUserActionEvent() mView == null
04-16 20:37:29.726 27855-27855/com.example.arsal.androtasbih E/ViewRootImpl: sendUserActionEvent() mView == null

Gradle文件如下。我已将compile sdk更改为22并且还更改了构建的工具编号,并且还执行了依赖项的更改

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion '22.0.1'

    defaultConfig {
        applicationId "com.example.arsal.androtasbih"
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'com.android.support:design:22.2.1'
    compile files('C:/Users/Arsal/AndroidStudioProjects/AndroTasbih/apache-httpcomponents-httpcore.jar')
}

2 个答案:

答案 0 :(得分:1)

无论何时我更改库或构建级别,特别是在版本中,我总是使缓存无效并重新启动。转到文件 - >使缓存无效。

答案 1 :(得分:0)

您可以在版本23中使用httpclient。只需将此添加到您的app build.gradle文件中。

    android {
           compileSdkVersion 23
           buildToolsVersion "23.0.2"
           useLibrary 'org.apache.http.legacy'
           -------------------
           --------------------   }