Browse Source

fix(android): resolve plugin registration with capacitor.plugins.json

- Add capacitor.plugins.json with correct DailyNotification plugin entry
- Use 'classpath' field instead of 'classname' for Capacitor 6 compatibility
- Add annotation processor dependency to plugin build.gradle
- Plugin now successfully registers with Capacitor bridge

Fixes: PluginLoadException and plugin availability issues
Resolves: DailyNotification plugin not loading despite manual registration
master
Matthew Raymer 1 week ago
parent
commit
07be444b64
  1. 6
      android/app/src/main/assets/capacitor.plugins.json
  2. 6
      android/plugin/build.gradle

6
android/app/src/main/assets/capacitor.plugins.json

@ -0,0 +1,6 @@
[
{
"name": "DailyNotification",
"classpath": "com.timesafari.dailynotification.DailyNotificationPlugin"
}
]

6
android/plugin/build.gradle

@ -1,7 +1,7 @@
apply plugin: 'com.android.library'
android {
namespace "com.timesafari.dailynotification"
namespace "com.timesafari.dailynotification.plugin"
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
@ -26,13 +26,17 @@ android {
}
dependencies {
implementation project(':capacitor-android')
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation "androidx.room:room-runtime:2.6.1"
implementation "androidx.work:work-runtime-ktx:2.9.0"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3"
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.10"
implementation "com.google.code.gson:gson:2.10.1"
implementation "androidx.core:core:1.12.0"
annotationProcessor "androidx.room:room-compiler:2.6.1"
annotationProcessor project(':capacitor-android')
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"

Loading…
Cancel
Save