Don’t use private interface in Android development

Building a project with native libraries, the process failed on arm64 version with Uncaught translation error: com.android.dex.util.ExceptionWithContext. Other builds (armv7, x86, x86_64) passed without any problem.

After some research, I’ve found out that the problem is caused by a private interface used inside one of classes. Just changing private to public saved the day.

It’s not a big deal but since the error message doesn’t help to identify what went wrong, it’s not easy to find the problem and you may end up searching for hours. Of course, there are some answers on stackoverflow.com. However, they propose to change private to public globally which is probably something you don’t want to do :-).

Leave a Reply

Your email address will not be published. Required fields are marked *