Android 14 targetted build fails with RECEIVER_EXPORTED variable error
NorthFred opened this issue · comments
Fred commented
Bug Report
Plugin(s)
Share Plugin @capacitor/share": "^6.0.0
Capacitor Version
Latest Dependencies:
@capacitor/cli: 6.0.0
@capacitor/core: 6.0.0
@capacitor/android: 6.0.0
@capacitor/ios: 6.0.0
Installed Dependencies:
@capacitor/ios: not installed
@capacitor/cli: 6.0.0
@capacitor/core: 6.0.0
@capacitor/android: 6.0.0
Platform(s)
Android 14 (target API level 34)
Current Behavior
Android build fails with output:
C:\.........\node_modules\@capacitor\share\android\src\main\java\com\capacitorjs\plugins\share\SharePlugin.java:49: error: cannot find symbol
ContextCompat.RECEIVER_EXPORTED
^
symbol: variable RECEIVER_EXPORTED
location: class ContextCompat
Expected Behavior
Android build is successful.
Other Technical Details
Additional Context
William commented
same here
William commented
update: I do not get this issue with a fresh app, running npx cap add android
, updating Android Studio and making sure the latest sdks are installed.
Fred commented
The error disappears when using updated variables.gradle
file during building:
ext {
minSdkVersion = 24
compileSdkVersion = 34
targetSdkVersion = 34
androidxActivityVersion = '1.7.0'
androidxAppCompatVersion = '1.6.1'
androidxCoordinatorLayoutVersion = '1.2.0'
androidxCoreVersion = '1.10.0'
androidxFragmentVersion = '1.5.6'
coreSplashScreenVersion = '1.0.0'
androidxWebkitVersion = '1.6.1'
junitVersion = '4.13.2'
androidxJunitVersion = '1.1.5'
androidxEspressoCoreVersion = '3.5.1'
cordovaAndroidVersion = '10.1.1'
}
Fred commented
Closing this.
ionitron-bot commented
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out.