Last time I wrote about how to get started with React Native. This week, I have a quick tidbit about writing safe enums in TypeScript!

Many programming languages have support for enums, but they work slightly differently in TypeScript.

It’s really simple to define and use an enum — you can do so like this:

enum MyEnum {
A,
B,
C,
}
function foo(enum: MyEnum) {}foo(MyEnum.A);

What really surprised me is that it’s also perfectly valid to do this:

foo(42);

WHY?!!? To be honest, this really makes no sense to me at all. If I’ve gone through all the…


Last time I shared a few IDE-related tidbits. This week, I have some quick tidbits on getting started with React Native!

My latest project is using React Native (with TypeScript), so I’ve been doing a lot of studying and preparation.

One of the tutorials I went through had me set up a fresh project using React Native’s TypeScript template. Unfortunately, I discovered that it wouldn’t build for iOS! After a little searching, it turns out there’s a known issue: https://github.com/facebook/react-native/issues/30836

In my sample project, I took the approach of commenting out the “Flipper” dependency, which allowed the app to build…


In my last post, I wrote about the RxJava share operator. This week, I have a few quick IDE tidbits!

I’ve written about some fun IDE plugins before in Tidbit #6, but I recently got a new work laptop, and in the process of reinstalling Android Studio discovered a new one!

Previously I had been using the NyanCat progress bar (because work should be fun!), but when I found out there’s a MARIO PROGRESS BAR I knew I needed to check it out:

If Mario isn’t your thing, that’s ok — there are a LOT of different options, depending on…


Last week, I wrote about dashboards and celebrated 2 years of Matt’s Tidbits! This time, I want to share… about sharing!

Have you ever written code that looks like this?

If so, you may have run into issues — what if a particular caller of start() forgets to call stop(), or possibly worse — calls it more than once? These types of problems are very common, especially in multi-threaded environments.

If you add on the layer of trying to incorporate reference counting with RxJava, the problem becomes even more complex. …


Last time, I shared some tools for automating common actions to help you focus better. This week, I have a few tidbits to share about dashboards.

Back in 2019, in my 2nd tidbit, I mentioned a handy tool — the Android distribution dashboard. Since then, Google has made some changes, and some of the helpful data that shows you installation percentages for different versions of Android is no longer there!

To clarify — the dashboard page is still there: https://developer.android.com/about/dashboards

But, Google has moved the information around usage of different versions of Android into Android Studio itself. …


Last week, I wrote about Android Studio’s “Patch” feature. This time, I want to share what I’ve done to help myself have better focus time.

I’ve finally admitted that I easily get distracted. Slack, email, etc. all provide a nearly constant barrage of inputs, and sometimes it’s impossible to go even 5 minutes without a new message coming in.

The most surefire way to help myself focus is to quit all of my communication apps, but that isn’t always the best idea, as I don’t want to just cut myself completely off from the rest of my team.

There are…


Last time I wrote about how to download missing Android source files. This week, I have an interesting tidbit to share about Patch files.

I’ve been doing some highly collaborative programming this past week, and one of my teammates suggested I send a “patch” containing my changes, instead of creating a branch and pushing my changes up that way.

What is a patch? It’s a different way of sharing code changes which don’t require you to commit anything. …


Happy New Year!!! What better way to ring in 2021 than with a helpful tidbit? Last time, I wrote about some tips for debugging Gradle files. This week, I want to share how to get missing Android sources to show up in Android Studio.

Have you ever seen the message “Sources for ‘Android API <#> Platform’ not found”? This can be a particularly annoying one, especially because it can be a little difficult to fix.

You may have likely run into the same issue I did, which was to download the sources (or refresh them), only to still see the…


Last week I wrote about fixing a build issue in Bitrise. This time, I have a story about debugging gradle files.

My current project uses an internal software library that recently released a new version. Unfortunately, I ran into some issues when trying to import a local copy of this library that didn’t make sense. Gradle reported an array index out of bounds exception. However, the library compiled fine on its own (when building it from its own project).

Upon closer exception, I found that this Gradle script was running an external git command using an Exec task. …


Last time I shared an in-depth look at JVM Options. This week, I have a quick tidbit about resolving build issues in Bitrise.

It happens to everyone. Inevitably, your CI system will fail to build your app, and you’ll have no idea why.

This week, my project experienced an error that looked like this:

Ensure required Android SDK components Retrying… Failed to ensure android components, error: output: Picked up _JAVA_OPTIONS: -Xms512m -Xmx2g FAILURE: Build failed with an exception. * What went wrong: Could not load compiled classes for settings file ‘/bitrise/src/settings.gradle’ from cache. Expected class file /root/.gradle/caches/jars-8/c09e2a1b661a58f8283b8fe94748d8fd/settings.jar/settings_2fggozq45hw451w290ssabnr7.class does not exist…

Matthew Groves

Senior Android Software Engineer @ Intrepid (part of Accenture) in Cambridge, MA. https://www.linkedin.com/in/matthew-groves-85677631/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store