-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Bug Report
Capacitor Version
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 8.0.0
@capacitor/core: 8.0.0
@capacitor/android: 8.0.0
@capacitor/ios: 8.0.0
Installed Dependencies:
@capacitor/cli: 7.2.0
@capacitor/core: 7.2.0
@capacitor/android: 7.2.0
@capacitor/ios: 7.2.0
[success] iOS looking great! 👌
[success] Android looking great! 👌
Platform(s)
- Android (Android Studio / Gradle sync)
Current Behavior
When using @capacitor/file-transfer@1.0.8, opening the Android project in Android Studio (or running a Gradle sync/build) fails while configuring the :capacitor-file-transfer module with errors like:
Could not find gradle-8.7.3.jar (com.android.tools.build:gradle:8.7.3)- plus a cascade of missing Android tooling/lint artifacts (e.g.
31.7.3)
See below
Root cause: the plugin’s Android build.gradle includes a buildscript dependency that pins the Android Gradle Plugin (AGP) to 8.7.3:
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:8.7.3"
}
}This forces Gradle to resolve AGP 8.7.3 (and matching tooling/lint artifacts like 31.7.3) from Google Maven, but those exact artifacts are not available at the expected coordinates, so dependency resolution fails.
Expected Behavior
@capacitor/file-transfer@1.0.8 should build / Gradle sync successfully in Android Studio.
Ideally, the plugin should not pin AGP inside the plugin module and instead inherit AGP from the consuming app/root project (common pattern for Capacitor/Android plugins).
Steps To Reproduce
- Install the plugin:
npm i @capacitor/file-transfer@1.0.8
npx cap sync android- Open the Android project in Android Studio (or run
./gradlew assembleDebug) - Observe Gradle sync/build failure for
:capacitor-file-transferwith missing AGP/tooling artifacts.
Additional Context
- This appears to be addressed in
@capacitor/file-transferv2.0.0+ (comparev1.0.8...v2.0.0), butv2.xtargets the Capacitor 8 plugin/tooling baseline, while we are currently on Capacitor 7.x and cannot upgrade yet:
v1.0.8...v2.0.0
- As a temporary workaround we can patch the plugin by removing the module-local AGP classpath so it uses the app’s AGP, but it would be great if
v1.xandv2.xcould be adjusted to avoid pinning an unresolvable AGP version.