google-developer-training / android-kotlin-fundamentals-starter-apps

android-kotlin-fundamentals-starter-apps
Other
1.1k stars 3.32k forks source link

GDGFinder res drawable in High Resolution #3

Closed shadowsheep1 closed 4 years ago

shadowsheep1 commented 5 years ago
2019-08-07 17:21:25.160 22602-22602/com.example.android.gdgfinder E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.android.gdgfinder, PID: 22602
    java.lang.OutOfMemoryError: Failed to allocate a 713382924 byte allocation with 13294698 free bytes and 364MB until OOM
        at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
        [...]
        at com.example.android.gdgfinder.databinding.HomeFragmentBinding.inflate(HomeFragmentBinding.java:74)
        at com.example.android.gdgfinder.databinding.HomeFragmentBinding.inflate(HomeFragmentBinding.java:60)
        [...]]
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)

Bad images are:

 GDGFinder-Starter $ git s | grep drawable
        modified:   app/src/main/res/drawable/behind.JPG
        modified:   app/src/main/res/drawable/session.jpg
        modified:   app/src/main/res/drawable/wtm.JPG
find . -size +2M | xargs ls -alh | awk -F ' ' '{print $5 $9}'
5.9M./behind.JPG
8.8M./session.jpg
2.9M./wtm.JPG
turboignited commented 5 years ago

Same problem just try optimising them that's what i'll be doing to get this up and running

android-dev-lxl commented 4 years ago

Thank you for your feedback. These images have been replaced with low resolution images.
Pull request: https://github.com/google-developer-training/android-kotlin-fundamentals-starter-apps/pull/17