1. 程式人生 > >[Android] Google Guava Invokedynamic requires

[Android] Google Guava Invokedynamic requires

升級 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"

改用後面這組即可解決。