iT邦幫忙

0

android 開發 為什麼Imageview 會變成leakcanary的圖片以及無法刪除 facebook sdk

以下是我的 build.gradle 檔案

因為小弟我第一次嘗試寫 android 所以看教學! 東補西補

最近在看 依賴的

app中沒有FB 登入的功能,想要刪除compile 'com.facebook.android:facebook-android-sdk:4.31.0' 但會出錯

還有 我的app中ImageView有些會變成 leakcanary 的 LOGO 想請教為什麼會這樣!?

dependencies {
    compile 'com.google.code.gson:gson:2.8.2'
    debugCompile 'com.amitshekhar.android:debug-db:1.0.2'
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
    compile 'com.squareup.retrofit2:retrofit:2.3.0'
    compile 'com.squareup.retrofit2:converter-moshi:2.3.0'
    compile 'com.jakewharton:butterknife:8.6.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
    compile 'com.basgeekball:awesome-validation:2.0'
    compile 'com.facebook.stetho:stetho:1.5.0'
    compile 'com.facebook.stetho:stetho-okhttp3:1.5.0'
    compile 'com.facebook.android:facebook-android-sdk:4.31.0'
    debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'
    releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
    testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
    //LeakCanary 檢測記憶體洩漏的工具
    compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"

    compile 'com.android.support:appcompat-v7:27.0.2'
    compile 'com.android.support:design:27.1.0'
    compile 'com.android.support:support-vector-drawable:27.1.0'
    compile 'com.android.support:cardview-v7:27.1.0'
    implementation 'com.android.support:recyclerview-v7:27.1.0'
}

apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
weiclin iT邦高手 4 級 ‧ 2018-03-07 15:31:30 檢舉
錯誤訊息沒告訴你原因嗎?
Victor iT邦新手 2 級 ‧ 2018-03-07 15:40:20 檢舉
您好! 圖片變成leakcanary 的 LOGO 有時候有,有時候沒有! 沒有跳出提示 Logcat 的部分沒有注意到! 剛剛匯出正式版在測試變正常了!
Victor iT邦新手 2 級 ‧ 2018-03-07 15:45:27 檢舉
想請問一下 weiclin大大! 是否有推薦的 build.gradle 教學文章嗎?
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

0
海綿寶寶
iT邦大神 1 級 ‧ 2018-03-08 11:33:29

為什麼Imageview 會變成leakcanary的圖片

找找看你的程式裡是否有寫類似iv_image.setImageResource(R.mipmap.ic_launcher);的 code

只找 setImageResource 比較找得到

我要發表回答

立即登入回答