Solved

Cannot access 'configure': it is internal in 'Companion'

  • 7 February 2022
  • 4 replies
  • 75 views

Userlevel 1
Badge +5

Hi,

I am getting this error 

Cannot access 'configure': it is internal in 'Companion' with the line below.

 

 

import com.revenuecat.purchases.*

Purchases.configure(PurchasesConfiguration.Builder(this, "public_google_sdk_key").build())

icon

Best answer by Cesar 7 February 2022, 16:24

View original

4 replies

Userlevel 3
Badge +3

Which Android SDK version are you using? We’ve just made `PurchasesConfiguration` public in version 5.0.0 which is currently in the release candidate status.

Userlevel 1
Badge +5

I was using 4.3.1 then updated to 4.6.1 but I still get the error message 

Userlevel 3
Badge +3

I see @Peter Rule . If you’re using 4.6.1, you should be using the now deprecated version of configure:

```

Purchases.configure(this, “public_google_sdk_key")
```


I’ve noticed how our docs are pointing to use the version you posted, but that’s not available until version 5.0.0-rc1. We should make that more clear in the docs

Userlevel 1
Badge +5

I see @Peter Rule . If you’re using 4.6.1, you should be using the now deprecated version of configure:

```

Purchases.configure(this, “public_google_sdk_key")
```


I’ve noticed how our docs are pointing to use the version you posted, but that’s not available until version 5.0.0-rc1. We should make that more clear in the docs

Thanks, that fixed it.

Reply