<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/the-android-crash-that-only-happened-on-certain-phones-0noc30egm" -->

---
title: The Android Crash That Only Happened on Certain Phones
description: A walkthrough of diagnosing and fixing an Android Resources$NotFoundException crash that only occurred on Huawei devices. The crash was caused by downloadable...
canonical: https://daily.dev/posts/the-android-crash-that-only-happened-on-certain-phones-0noc30egm
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: The Android Crash That Only Happened on Certain Phones | daily.dev
og:description: A walkthrough of diagnosing and fixing an Android Resources$NotFoundException crash that only occurred on Huawei devices. The crash was caused by downloadable...
og:url: https://daily.dev/posts/the-android-crash-that-only-happened-on-certain-phones-0noc30egm
og:image: https://api.daily.dev/og/posts/0NOc30EGM.png
og:image:alt: The Android Crash That Only Happened on Certain Phones
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The Android Crash That Only Happened on Certain Phones

**[ProAndroidDev](https://daily.dev/sources/pand)** · 4 min read · 3 upvotes · 1 comments

## Summary

A walkthrough of diagnosing and fixing an Android Resources$NotFoundException crash that only occurred on Huawei devices. The crash was caused by downloadable fonts relying on Google Play Services, which Huawei devices lack due to U.S. trade restrictions. Firebase Crashlytics was used to isolate the crash to a specific OEM. Two solutions are presented: a try-catch fallback and the recommended fix of bundling the font locally inside the APK to avoid dependency on Google Mobile Services.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://proandroiddev.com/the-android-crash-that-only-happened-on-certain-phones-16ce2effe84e>

## Questions this post answers

### Why does ResourcesCompat.getFont() throw a Resources.NotFoundException on Huawei phones but not other Android devices?

It happens because many Huawei devices released after U.S. trade restrictions ship without Google Mobile Services and use Huawei Mobile Services instead. Since downloadable fonts via ResourcesCompat.getFont() rely on connecting to Google Play Services' font provider to fetch or cache the font, that provider is unavailable or unreachable on these devices, causing android.content.res.Resources$NotFoundException.

_Track down device-specific crashes like this Huawei font issue faster with the debugging context daily.dev surfaces for Android developers._

### How do I fix a font resource crash caused by Google's Downloadable Fonts API not working on some devices?

Bundle the font locally instead of relying on downloadable fonts: download the desired weight, such as Roboto Medium, place it as a .ttf file in res/font/roboto_medium.ttf, and reference it via ResourcesCompat.getFont(context, R.font.roboto_medium). This packages the font inside the APK so it works offline and without Google Play Services, including on Huawei and other OEMs lacking GMS.

_Developers hardening apps against OEM quirks can find practical Android fixes like this through daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@pratikbharad** · 0 upvotes

> Yes, Firebase Crashlytics is a very good tool. It also helped us a LOT.

## Similar posts on daily.dev

- [How We Solved a Random React Native Camera Crash That Only Happened on Some Android Devices](https://daily.dev/posts/how-we-solved-a-random-react-native-camera-crash-that-only-happened-on-some-android-devices-nxlobmbkd) · Medium · 0 upvotes · 0 comments
- [Prioritizing Memory Efficiency: Essential Steps for Android 17](https://daily.dev/posts/prioritizing-memory-efficiency-essential-steps-for-android-17-zj0b3ibcc) · Android Developers Blog · 1 upvotes · 0 comments
- [Google forces Android apps to use memory more wisely as RAMpocalypse rages](https://daily.dev/posts/google-forces-android-apps-to-use-memory-more-wisely-as-rampocalypse-rages-slieelovu) · The Register · 1 upvotes · 1 comments
- [Why Your Android Background Location Still Gets Killed \(And How to Fight OEM Power Managers\)](https://daily.dev/posts/why-your-android-background-location-still-gets-killed-and-how-to-fight-oem-power-managers--is2elfr2h) · Medium · 0 upvotes · 0 comments

---

Tags: [#android](https://daily.dev/tags/android), [#kotlin](https://daily.dev/tags/kotlin)

[View this post on daily.dev](https://daily.dev/posts/the-android-crash-that-only-happened-on-certain-phones-0noc30egm)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"The Android Crash That Only Happened on Certain Phones","url":"https://daily.dev/posts/the-android-crash-that-only-happened-on-certain-phones-0noc30egm","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/the-android-crash-that-only-happened-on-certain-phones-0noc30egm"},"datePublished":"2026-07-06T15:50:29.443Z","dateModified":"2026-09-14T08:00:54.509Z","description":"A walkthrough of diagnosing and fixing an Android Resources$NotFoundException crash that only occurred on Huawei devices. The crash was caused by downloadable...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/01a19332bb85c9488bebf96ced09c6ef?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/01a19332bb85c9488bebf96ced09c6ef?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"ProAndroidDev","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"ProAndroidDev","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/656c1eb1f1ef4f91936e86fc16545114","url":"https://daily.dev/sources/pand"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/the-android-crash-that-only-happened-on-certain-phones-0noc30egm","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"android,kotlin","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"ProAndroidDev","item":"https://daily.dev/sources/pand"},{"@type":"ListItem","position":3,"name":"The Android Crash That Only Happened on Certain Phones"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/the-android-crash-that-only-happened-on-certain-phones-0noc30egm","comment":[{"@type":"Comment","text":"Yes, Firebase Crashlytics is a very good tool. It also helped us a LOT.","datePublished":"2026-07-07T05:51:16.395Z","url":"https://daily.dev/posts/0NOc30EGM#c-6cjq7URnL","author":{"@type":"Person","name":"pratik bharad","url":"https://daily.dev/pratikbharad","image":"https://media.daily.dev/image/upload/s--_L6xwplo--/f_auto,q_auto/v1700137990/avatars/avatar_yQ0Yyq4SQpV7nCTC0nWSi"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/the-android-crash-that-only-happened-on-certain-phones-0noc30egm#faq","mainEntity":[{"@type":"Question","name":"Why does ResourcesCompat.getFont() throw a Resources.NotFoundException on Huawei phones but not other Android devices?","acceptedAnswer":{"@type":"Answer","text":"It happens because many Huawei devices released after U.S. trade restrictions ship without Google Mobile Services and use Huawei Mobile Services instead. Since downloadable fonts via ResourcesCompat.getFont() rely on connecting to Google Play Services' font provider to fetch or cache the font, that provider is unavailable or unreachable on these devices, causing android.content.res.Resources$NotFoundException. Track down device-specific crashes like this Huawei font issue faster with the debugging context daily.dev surfaces for Android developers."}},{"@type":"Question","name":"How do I fix a font resource crash caused by Google's Downloadable Fonts API not working on some devices?","acceptedAnswer":{"@type":"Answer","text":"Bundle the font locally instead of relying on downloadable fonts: download the desired weight, such as Roboto Medium, place it as a .ttf file in res/font/roboto_medium.ttf, and reference it via ResourcesCompat.getFont(context, R.font.roboto_medium). This packages the font inside the APK so it works offline and without Google Play Services, including on Huawei and other OEMs lacking GMS. Developers hardening apps against OEM quirks can find practical Android fixes like this through daily.dev."}}]}
```

