mapiacompany / capacitor-codepush

Capacitor plugin for CodePush
http://appcenter.ms
Other
151 stars 65 forks source link

Android build error: Could not get unknown property 'androidxAppCompatVersion' #55

Closed leandroromano closed 2 years ago

leandroromano commented 2 years ago

Description

Im trying to use this capacitor-codepush in an ionic + capacitor app for Android and it fails when building with this error:

A problem occurred evaluating project ':capacitor-codepush'. Could not get unknown property 'androidxAppCompatVersion' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

Reproduction

install latest version of capacitor-codepush, then run: ng build npx cap copy android npx cap open android

The error is fired when the app is indexing in Android Studio.

Additional Information

It only happens to Android, in iOS is working

List of installed plugins:

"@capacitor/core": "^3.2.3"
"@capacitor/device": "^1.0.3"
"@capacitor/dialog": "^1.0.3"
"@capacitor/filesystem": "^1.0.3"
"@capacitor/android": "^3.2.3"

Any help? Thanks in advance

Clovel commented 2 years ago

Can you try using the ionic commands ? Like so :

ionic cap sync android
ionic cap build android

Be sure to have @ionic/cli & @capacitor/cli installed (globally or in your project's dev dependencies)

leandroromano commented 2 years ago

I found the solution and it was completely my fault. I forgot to set the variable androidxAppCompatVersion in my variables.gradle file, so that missing variable was causing the problem at building time.

Thanks!