Closed jongbonga closed 3 years ago
I would try this:
npx cap sync
Additionally, you could try running Build -> "Clean Project" in Android Studio.
@diachedelic I have tried it dozens of time 🥲 cleared cache & restarted Android studio, removed the Android folder 🥲.
I have a couple of other plugins capacitor (intercom, barcode scanner, google map) that are syncing fine. Gradle fails the syncing when this one is in, but sync fine without it.
You say it's the exact same issue as #9: but do you also see the message _Error: package com.equimaps.capacitor_backgroundgeolocation does not exist in the error log?
You might want to compare the value of compileSdkVersion
in your app, your working plugins, and this plugin. See https://github.com/react-native-image-picker/react-native-image-picker/issues/1635
You say it's the exact same issue as #9: but do you also see the message _Error: package com.equimaps.capacitor_backgroundgeolocation does not exist in the error log?
You might want to compare the value of
compileSdkVersion
in your app, your working plugins, and this plugin. See react-native-image-picker/react-native-image-picker#1635
I tried with 29 but nothing new happened
How about this: https://stackoverflow.com/a/67695836
Also, what do you see in the "Build Variants" panel?
I have both API levels 29 & 30 installed.
I didn't encounter any issue with capacitor v2 and corresponding plugin. since the upgrade, I'm unable to build
Build Variants
Please help me locate the panel.
Went as far as to reinstall Android Studio but the error percists.
In the bottom left of your screenshot there is a "Build Variants" tab.
Try cloning this repository and running the application in the "example" directory. Then we can know if there is a problem with your project in particular, or your IDE.
In the bottom left of your screenshot, there is a "Build Variants" tab.
Try cloning this repository and running the application in the "example" directory. Then we can know if there is a problem with your project in particular or your IDE.
I tried and it worked fine, but also noticed capacitor is still in RC on the example (I'm haven't tried to update it)
This is what my Build Variants panel looks like:
Could you please trying upgrading Capacitor (in the cloned repo) to the latest version and seeing if the error manifests itself?
I tried and it worked fine, but also noticed capacitor is still in RC on the example (I'm haven't tried to update it)
I just realized that I only test on iOS when adding this comment.
Fresh clone, ran fine before and after updating Capacitor 😔
Then there must be an incompatibility between this plugin and your project. I can think of these approaches:
Also, what do you see in the "Build Variants" panel?
when I remove the plugin, this is what my build variants panel looks like
- Examine the difference between the build.gradle and app/build.gradle files of the example and of your project.
The only difference is the example uses a "local version" of the plugins & mine comes from node_modules (which I don't think matters much). And my Gradle version is 7.
I will try the other suggestions and revert with findings
I created a brand new project, only added this plugin and nothing else
Same error :/
using this properties in variables.gradle the message disappear, compile successfully and work ext { minSdkVersion = 21 compileSdkVersion = 30 targetSdkVersion = 30 androidxActivityVersion = '1.2.0' androidxAppCompatVersion = '1.2.0' androidxBrowserVersion = '1.3.0' androidxLocalbroadcastmanagerVersion = '1.0.0' androidxCoordinatorLayoutVersion = '1.1.0' androidxCoreVersion = '1.3.2' androidxFragmentVersion = '1.3.0' playServicesLocationVersion = '17.0.0' junitVersion = '4.13.1' androidxJunitVersion = '1.1.2' androidxEspressoCoreVersion = '3.3.0' cordovaAndroidVersion = '7.0.0' }
How does that variables.gradle
file differ from the default?
How does that
variables.gradle
file differ from the default?
Mine didn’t have androidxLocalbroadcastmanagerVersion
, playServicesLocationVersion
& androidxBrowserVersion
per default
I believe I have fixed this issue in release v1.0.3. Can you please test? You should not need to modify your variables.gradle
file from the default.
I have this problem to in old projects
I have this problem too, I was in react-native v0.64.2, the problem occur when upgrading to react-native v0.71.8
Describe the bug I'm getting the exact same issue as #9 on version 1.0.2 for capacitor 3
Here is a snippet of the error log
No variants found for ':capacitor-community-background-geolocation'. Check build files to ensure at least one variant exists. at: com.android.tools.idea.gradle.project.sync.idea.svs.AndroidModule.deliverModels(AndroidModule.kt:191) com.android.tools.idea.gradle.project.sync.idea.svs.AndroidExtraModelProvider$Worker.populateBuildModels(AndroidExtraModelProvider.kt:121)
To Reproduce Followed the installation instructions and run on Android
Expected behavior To not run through a build error
Smartphone (please complete the following information):