# No Audio when APK is built in release mode (FMOD | Android)

**URL:** <https://qa.fmod.com/t/no-audio-when-apk-is-built-in-release-mode-fmod-android/13534>\
**Category:** FMOD Studio\
**Created:** [November 13, 2017, 3:51am UTC](https://qa.fmod.com/t/no-audio-when-apk-is-built-in-release-mode-fmod-android/13534 "2017-11-13T03:51:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mozartalouis](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@mozartalouis](https://qa.fmod.com/u/mozartalouis)\
**Post date:** [November 13, 2017, 3:51am UTC](https://qa.fmod.com/t/no-audio-when-apk-is-built-in-release-mode-fmod-android/13534/1 "2017-11-13T03:51:53Z")

</div>

I’ve Tried this several times and I can’t seem to find out what the answer is.

I’ve done all the steps to get it to build with android and it works great when in debug mode, But as soon as I try to make a release APK, FMOD doesn’t play any sounds. What’s ever more crazy is that it’s not like its the release libraries that don’t work because when I use the release libraries with a debug build, it works fine!

Can anyone help me with this issue? Also what sucks is that I can’t get a good stacktrace since it’s in release mode and I use progaurd. My proguard config contains:

-keep class org.fmod.\*\* { _; }  
-dontwarn org.fmod._\*

Without the Don’t warn, I get this error:

Warning: org.fmod.MediaCodec$2DataSource: can’t find superclass or interface android.media.MediaDataSource  
Warning: org.fmod.MediaCodec: can’t find referenced method ‘void setDataSource(android.media.MediaDataSource)’ in library class android.media.MediaExtractor  
Warning: org.fmod.MediaCodec$2DataSource: can’t find referenced class android.media.MediaDataSource  
Warning: org.fmod.MediaCodec$2DataSource: can’t find referenced class android.media.MediaDataSource

---

<div class="post-metadata">

**Author:** ![mozartalouis](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@mozartalouis](https://qa.fmod.com/u/mozartalouis)\
**Post date:** [November 13, 2017, 5:39am UTC](https://qa.fmod.com/t/no-audio-when-apk-is-built-in-release-mode-fmod-android/13534/2 "2017-11-13T05:39:50Z")

</div>

I solved my issue. What I was doing before was checking the results of an FMOD\_RESULT like this

`define CHECK_RESULT(result) assert(result == FMOD_OK)`

Which works fine in debug mode but not in release mode. I changed it to this:

```auto
inline void CHECK_RESULT(FMOD_RESULT result) {
   assert(result == FMOD_OK);
}

```

And it was working fine. I’m guessing the MACRO was getting lost or something. Hope this helps someone!
