我使用我的mac os上的android studio來創建一個空的活動,並運行它。 該應用程序可以設置和工作well.But logcat報告許多錯誤。爲什麼我在mac os上的android studio報告了這麼多錯誤!但應用程序運行良好
就這樣如下:
09-15 06:24:43.847 7857-7857/com.home.ating.test E/InstantRun: Could not find slices in APK; aborting.
09-15 06:24:43.857 7857-7857/com.home.ating.test E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.home.ating.test.MainActivity.access$super
09-15 06:24:43.857 7857-7857/com.home.ating.test E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.home.ating.test.MainActivity.access$super
09-15 06:24:43.857 7857-7857/com.home.ating.test E/dalvikvm: Could not find class 'android.media.session.MediaController', referenced from method com.home.ating.test.MainActivity.access$super
09-15 06:24:43.857 7857-7857/com.home.ating.test E/dalvikvm: Could not find class 'android.widget.Toolbar', referenced from method com.home.ating.test.MainActivity.access$super
09-15 06:24:43.857 7857-7857/com.home.ating.test E/dalvikvm: Could not find class 'android.app.ActivityManager$TaskDescription', referenced from method com.home.ating.test.MainActivity.access$super
09-15 06:24:43.857 7857-7857/com.home.ating.test E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.home.ating.test.MainActivity.access$super
09-15 06:24:43.857 7857-7857/com.home.ating.test E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.home.ating.test.MainActivity.access$super
09-15 06:24:43.867 7857-7857/com.home.ating.test E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.home.ating.test.MainActivity.access$super
09-15 06:24:43.877 7857-7857/com.home.ating.test E/dalvikvm: Could not find class 'android.app.assist.AssistContent', referenced from method com.home.ating.test.MainActivity.access$super
09-15 06:24:43.877 7857-7857/com.home.ating.test E/dalvikvm: Could not find class 'android.view.SearchEvent', referenced from method com.home.ating.test.MainActivity.access$super
09-15 06:24:43.877 7857-7857/com.home.ating.test E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.home.ating.test.MainActivity.access$super
09-15 06:24:43.927 7857-7857/com.home.ating.test E/dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering
和我的build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.home.ating.test"
minSdkVersion 19
targetSdkVersion 24
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:24.2.0'
}
我不知道該如何處理呢?我怎樣才能消除這些錯誤? 我的android模擬器版本是4.4。
請發佈您的MainActivity代碼。 –
請發佈設備運行的Android版本 –
我hava更新了我的問題。 Android模擬器版本是4.4。 – twist