[Android] Google Guava Invokedynamic requires –min-sdk-version >= 26

Posted in :

升級 gradle 之後,Google Guava 會丟出 error 造成無法 build apk. Error message:

Error:Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires –min-sdk-version >= 26)


解法:

implementation "com.google.guava:guava:23.0"

Instead of

implementation "com.google.guava:guava:23.0-android"

 

改用後面這組即可解決。

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *