Plugin(s):
authentication
Platform(s):
android
Current behavior:
Linting the android project in CI environment fails when using the facebook provider because of missing dependency.
$ ./gradlew app:lint
> Task :app:lintDebug FAILED
Lint found 2 errors, 42 warnings. First failure:
android/app/src/main/AndroidManifest.xml:124: Error: Class referenced in the manifest, com.facebook.FacebookActivity, was not found in the project or the libraries [MissingClass]
android:name="com.facebook.FacebookActivity"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The full lint text report is located at:
android/app/build/intermediates/lint_intermediate_text_report/debug/lint-results-debug.txt
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:lintDebug'.
> Lint found errors in the project; aborting build.
Fix the issues identified by lint, or create a baseline to see only new errors:
android {
lint {
baseline = file("lint-baseline.xml")
}
}
For more details, see https://developer.android.com/studio/write/lint#snapshot
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 10s
642 actionable tasks: 1 executed, 641 up-to-date
Expected behavior:
./gradle app:lint
should pass
Steps to reproduce:
Implement authentication with the facebook provider according to documentation and run ./gradle app:lint
Related code:
facebookLoginVersion = '14.0.0'
<activity android:name="com.facebook.FacebookActivity"
Other information:
The project builds and runs in Android Studio.
A workaround I have found is to add the dependency in my top level build.gradle
implementation "com.facebook.android:facebook-login:$facebookLoginVersion
My guess is that the linter doesn't like that the dependency is in a subpackage while FacebookActivity
is used at the top level (in AndroidManifest.xml
). One solution is to change the documentation to say that the dependency should be added manually.
Capacitor doctor:
π Capacitor Doctor π
Latest Dependencies:
@capacitor/cli: 3.5.1
@capacitor/core: 3.5.1
@capacitor/android: 3.5.1
@capacitor/ios: 3.5.1
Installed Dependencies:
@capacitor/cli: 3.4.3
@capacitor/core: 3.4.3
@capacitor/android: 3.4.3
@capacitor/ios: 3.4.3
[error] Xcode is not installed
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too