Skip to content

Commit 0f9b5e9

Browse files
committed
feat(AP-708) Adding more readme info
1 parent 2f6c01f commit 0f9b5e9

File tree

1 file changed

+35
-3
lines changed

1 file changed

+35
-3
lines changed

README.md

+35-3
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,51 @@ Cordova Plugin for SightCall.
5252

5353
## Troubleshooting guide
5454

55-
Q: I get compilation errors on Android
55+
**Q: I get compilation errors on Android**
5656

5757
A: First, check if your project compiles without this plugin. In that case, verify the plugin version you are using on your project because since 4.0 version we just support Cordova projects that are using Android with AndroidX. Below 4.0 version, take into account that this plugin is not compatible with AndroidX as it uses old Android Support Libraries. In that case, to migrate the plugin code to AndroidX, you can do the following:
5858

5959
- Add plugin to enable AndroidX in the project (`cordova plugin add cordova-plugin-androidx`) and add plugin to patch existing plugin source that uses the Android Support Library to use AndroidX (`cordova plugin add cordova-plugin-androidx-adapter`)
6060

6161
- Or using Jetifier if you are using this plugin on a Capacitor project: https://github.com/mikehardy/jetifier
6262

63-
64-
Q: I get Android compilation errors when linking resources in the manifest file like:
63+
**Q: I get Android compilation errors when linking resources in the manifest file like:**
6564
```
6665
error: attribute android:requestLegacyExternalStorage not found.
6766
error: attribute android:foregroundServiceType not found.
6867
```
6968

7069
A: You need to compile against SDK 29 and maybe use the most recent build tools for aapt to know this attribute, because it's introduced in Android 10.
70+
71+
**Q: Could not resolve all artifacts for configuration ':app:debugCompileClasspath'. Something like:**
72+
```
73+
Execution failed for task ':app:androidDependencies'.
74+
> Could not resolve all artifacts for configuration ':app:debugCompileClasspath'.
75+
> Could not resolve androidx.lifecycle:lifecycle-runtime:2.1.0-beta01.
76+
Required by:
77+
project :app
78+
> Cannot find a version of 'androidx.lifecycle:lifecycle-runtime' that satisfies the version constraints:
79+
Dependency path 'android:app:unspecified' --> 'com.sightcall.universal:universal-sdk:4.3.20' --> 'com.google.android.material:material:1.3.0' --> 'androidx.lifecycle:lifecycle-runtime:2.0.0'
80+
[...]
81+
```
82+
83+
A: There's a collision between plugin dependencies. Try to check app dependencies tree.
84+
```
85+
gradlew -q dependencies app:dependencies --configuration debugCompileClasspath
86+
```
87+
You will need to force versions inside `build-extras.gradle`
88+
```
89+
ext.postBuildExtras = {
90+
[...]
91+
configurations.all {
92+
resolutionStrategy {
93+
forcedModules = [
94+
'androidx.collection:collection:1.0.0',
95+
'androidx.lifecycle:lifecycle-viewmodel:2.1.0',
96+
'androidx.fragment:fragment:1.1.0'
97+
[...]
98+
]
99+
}
100+
}
101+
}
102+
```

0 commit comments

Comments
 (0)