From 07be444b64d1aefca0341e5c0b54b2d33f4a87af Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Mon, 13 Oct 2025 10:50:03 +0000 Subject: [PATCH] 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 --- android/app/src/main/assets/capacitor.plugins.json | 6 ++++++ android/plugin/build.gradle | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 android/app/src/main/assets/capacitor.plugins.json diff --git a/android/app/src/main/assets/capacitor.plugins.json b/android/app/src/main/assets/capacitor.plugins.json new file mode 100644 index 0000000..e661cf9 --- /dev/null +++ b/android/app/src/main/assets/capacitor.plugins.json @@ -0,0 +1,6 @@ +[ + { + "name": "DailyNotification", + "classpath": "com.timesafari.dailynotification.DailyNotificationPlugin" + } +] diff --git a/android/plugin/build.gradle b/android/plugin/build.gradle index 365b823..b0b548f 100644 --- a/android/plugin/build.gradle +++ b/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"