Browse Source
- Add AAR Duplicate Class Issues section to BUILDING.md with step-by-step solutions - Create dedicated docs/aar-integration-troubleshooting.md with complete troubleshooting guide - Document project reference approach (recommended) vs AAR-only approach - Add verification steps, prevention strategies, and best practices - Update README.md with links to new documentation - Resolve duplicate class issues through proper project reference configuration Fixes AAR integration issues that caused build failures due to plugin being included both as project reference and AAR file simultaneously.master
13 changed files with 113 additions and 135 deletions
@ -1,16 +1,16 @@ |
|||||
ext { |
ext { |
||||
minSdkVersion = 22 |
minSdkVersion = 23 |
||||
compileSdkVersion = 34 |
compileSdkVersion = 35 |
||||
targetSdkVersion = 34 |
targetSdkVersion = 35 |
||||
androidxActivityVersion = '1.7.0' |
androidxActivityVersion = '1.9.2' |
||||
androidxAppCompatVersion = '1.7.0' |
androidxAppCompatVersion = '1.7.0' |
||||
androidxCoordinatorLayoutVersion = '1.2.0' |
androidxCoordinatorLayoutVersion = '1.2.0' |
||||
androidxCoreVersion = '1.12.0' |
androidxCoreVersion = '1.15.0' |
||||
androidxFragmentVersion = '1.6.2' |
androidxFragmentVersion = '1.8.4' |
||||
coreSplashScreenVersion = '1.0.0' |
coreSplashScreenVersion = '1.0.1' |
||||
androidxWebkitVersion = '1.6.1' |
androidxWebkitVersion = '1.12.1' |
||||
junitVersion = '4.13.2' |
junitVersion = '4.13.2' |
||||
androidxJunitVersion = '1.1.5' |
androidxJunitVersion = '1.2.1' |
||||
androidxEspressoCoreVersion = '3.5.1' |
androidxEspressoCoreVersion = '3.6.1' |
||||
cordovaAndroidVersion = '10.1.1' |
cordovaAndroidVersion = '10.1.1' |
||||
} |
} |
||||
@ -1,25 +0,0 @@ |
|||||
apply plugin: 'com.android.library' |
|
||||
|
|
||||
android { |
|
||||
namespace "com.timesafari.dailynotification" |
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion |
|
||||
|
|
||||
defaultConfig { |
|
||||
minSdkVersion rootProject.ext.minSdkVersion |
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion |
|
||||
versionCode 1 |
|
||||
versionName "1.0" |
|
||||
} |
|
||||
|
|
||||
compileOptions { |
|
||||
sourceCompatibility JavaVersion.VERSION_17 |
|
||||
targetCompatibility JavaVersion.VERSION_17 |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
dependencies { |
|
||||
implementation project(':capacitor-android') |
|
||||
|
|
||||
// Capacitor annotation processor for automatic plugin discovery |
|
||||
annotationProcessor project(':capacitor-android') |
|
||||
} |
|
||||
@ -1,6 +0,0 @@ |
|||||
[ |
|
||||
{ |
|
||||
"name": "DailyNotification", |
|
||||
"classpath": "com.timesafari.dailynotification.DailyNotificationPlugin" |
|
||||
} |
|
||||
] |
|
||||
@ -1,43 +0,0 @@ |
|||||
package com.timesafari.dailynotification; |
|
||||
|
|
||||
import com.getcapacitor.JSObject; |
|
||||
import com.getcapacitor.Plugin; |
|
||||
import com.getcapacitor.PluginCall; |
|
||||
import com.getcapacitor.PluginMethod; |
|
||||
import com.getcapacitor.annotation.CapacitorPlugin; |
|
||||
|
|
||||
@CapacitorPlugin(name = "DailyNotification") |
|
||||
public class DailyNotificationPlugin extends Plugin { |
|
||||
|
|
||||
@Override |
|
||||
public void load() { |
|
||||
super.load(); |
|
||||
// Log that the plugin has loaded
|
|
||||
android.util.Log.d("DailyNotificationPlugin", "Plugin load() method called"); |
|
||||
System.out.println("DN|PLUGIN_LOAD_START"); |
|
||||
} |
|
||||
|
|
||||
@PluginMethod |
|
||||
public void echo(PluginCall call) { |
|
||||
String value = call.getString("value"); |
|
||||
JSObject ret = new JSObject(); |
|
||||
ret.put("value", value); |
|
||||
call.resolve(ret); |
|
||||
} |
|
||||
|
|
||||
@PluginMethod |
|
||||
public void checkStatus(PluginCall call) { |
|
||||
JSObject ret = new JSObject(); |
|
||||
ret.put("status", "OK from native plugin"); |
|
||||
call.resolve(ret); |
|
||||
} |
|
||||
|
|
||||
@PluginMethod |
|
||||
public void scheduleNotification(PluginCall call) { |
|
||||
String title = call.getString("title"); |
|
||||
String message = call.getString("message"); |
|
||||
JSObject ret = new JSObject(); |
|
||||
ret.put("scheduleResult", "Notification '" + title + "' scheduled with message '" + message + "'"); |
|
||||
call.resolve(ret); |
|
||||
} |
|
||||
} |
|
||||
Loading…
Reference in new issue