10

I was working on 11.0.4 firebase libraries version. Today I've switched to the newest: 11.2.0 and when I try to build release version (with ProGuard on) I get the error:

Warning:com.google.android.gms.internal.zzbdo: can't find referenced method 'boolean isInstantApp(java.lang.String)' in library class android.content.pm.PackageManager
Warning:there were 1 unresolved references to library class members.
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first.
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
> Job failed, see logs for details

And gradle console:

Warning: there were 1 unresolved references to library class members.
         You probably need to update the library versions.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember)
AppiDevo
  • 3,195
  • 3
  • 33
  • 51

2 Answers2

17

I was using API 25 (rev.3), the method isInstantAppwas added in API 26. Changing targetSdkVersion to this version resloved the problem.

https://github.com/android/platform_frameworks_base/commit/31a16551910492321a6f7c291eb33e1458f39f0a#diff-a5f0b5ebe6a871aca1c5841bc0497538

AppiDevo
  • 3,195
  • 3
  • 33
  • 51
10

For the ones who don't want to start using runtime permissions yet, you don't need to increase targetSdkVersion increasing compileSdkVersion is enough.

intacto
  • 451
  • 4
  • 12
  • 1
    Sadly this is not a long term solution, Google are planing to crack down on apps that don't target recent versions of Android: http://www.androidpolice.com/2017/12/19/play-store-require-new-updated-apps-target-recent-api-levels-distribute-native-apps-64-bit-support/ – k2col Jan 08 '18 at 22:10