Closed nvasilev0101 closed 2 years ago
I tried to manually reduce the size and compress the images from the /res/drawable folder with ~70% in order to finally get a successful run. Project images should not have sizes of 4000+px by 4000+px and take 3MB of storage space as it's the case here!
I resolved the problem by adding two lines in the manifest file:
<application
android:hardwareAccelerated="false"
android:largeHeap="true"
I resolved the problem by moving all the images to drawable-xxhdpi folder.
I can't get it to work... tried downrezing the images(which cut their size at least 70%), enabling/disabling hardware acceleration, largeheap, putting the images on drawables-xxhdpi folder, updating all the dependencies (since all of the ones that come in the gradle build files are ancient at this point)
No go... it crashes as soon as I navigate to the GdgListFragment
happens on both the default emulator image that comes with android studio and my actual phone, its a shame... the last lesson even
edit: nvm... my problem was this: https://github.com/udacity/andfun-kotlin-gdg-finder/issues/4
just updating the url at GdgApiService solved the problem :P
I resolved the problem by moving all the images to drawable-xxhdpi folder.
Yep. This solves the issue. Not attempting to know which JPG or vector was causing the issue, I basically emptied the drawable/ into a new folder drawable-xxhdpi/..
Stale issue.
Ran the code on two different devices: Nexus 5 and Pixel XL. On both the app crashes throwing different exceptions.
The Nexus throws this:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.android.gdgfinder, PID: 7450
java.lang.OutOfMemoryError: Failed to allocate a 108000012 byte allocation with 16777216 free bytes and 41MB until OOM
The Pixel throws this:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.android.gdgfinder, PID: 14577
java.lang.RuntimeException: Canvas: trying to draw too large(169590960bytes) bitmap.
When I enable hardware acceleration and large heap in the manifest, the app runs on the Nexus, but without showing any images. while the Pixel still throws the same exception.