Debugging Details: Following tutorial to migrate from Android Billing 4.0 to 5.0 https://developer.android.com/google/play/billing/migrate-gpblv5, specifically in the section "Showing products available to buy" The 'of' in ImmutableList is flagged red and the error in Android Studio is
Cannot resolve method 'of' in 'ImmutableList'"
How can I resolve?
Minimal reproducible code to get the Compilation Error:
QueryProductDetailsParams queryProductDetailsParams =
QueryProductDetailsParams.newBuilder()
.setProductList(
ImmutableList.of(
QueryProductDetailsParams.Product.newBuilder()
.setProductId(PREMIUM_MONTHLY_VERSION_ID)
.setProductType(BillingClient.ProductType.SUBS)
.build()))
.build();
Here are the specific details:
Desired Behaviour: Code compiles fine.
Specific Problem or Error: Compilation error.