Closed renege closed 5 years ago
@moberwasserlechner
> Task :byteowls-capacitor-filesharer:compileReleaseJavaWithJavac
Note: /Users/xxx/Code/foobar/app/node_modules/@byteowls/capacitor-filesharer/android/src/main/java/com/byteowls/capacitor/filesharer/ConfigUtils.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
This is just a warning. Don't worry about it.
Please share your versions (Cap, Android, Plugin) and your plugin config.
What is the correct plugin config? What dependency to use in build.gradle for the capacitor-android version? Think that's the issue here @moberwasserlechner
Then please share your build.gradle and your version of Capacitor. I'm not able to help if you donot provide that information.
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "foo.bar.foo"
minSdkVersion 21
targetSdkVersion 28
versionCode 6
versionName "1.0.2"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
maven {
url "https://dl.bintray.com/ionic-team/capacitor"
}
flatDir{
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'ionic-team:capacitor-android:1.0.0-beta.17'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation project(':capacitor-cordova-android-plugins')
}
apply from: 'capacitor.build.gradle'
try {
def servicesJSON = file('google-services.json')
if (servicesJSON.text) {
apply plugin: 'com.google.gms.google-services'
}
} catch(Exception e) {
logger.warn("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
}
So you're using Capacitor beta17 but the plugin needs at least 1.0.0. See readme.
Please look at a current Capacitor project and upgrade. You need to remove at least mplementation 'ionic-team:capacitor-android:1.0.0-beta.17'
. But upgrading your app is out of scope.
It seems that the issue was not related to the plugin. Plugin needs Capacitor 1.0.0+.
After upgrading this happens in Android Studio when trying to generate the APK.