Open kidandcat opened 3 years ago
Sorry for the delayed response. I will investigate the issue and update as soon as I can.
Where did you put the following line of code?
Gigya.setApplication(this);
In development mode it works without that line.
But I put it here to try (although it still doesn't work in release mode):
We had all the commented code previowsly, but after upgrading the plugin we removed it and it still works in develop mode.
The problem happens only when running in release mode or creating a release APK.
Yes. from the latest version "setApplication" is not needed as the plugin handles the SDK initialization. I will continue to investigate the issue and update as soon as I can.
Are you using: minifyEnabled true?
I don't think so, I'll check it again.
Edit: no, it is not enabled
Please attach the following so I can inspect it better:
Thanks
Build output: build.txt
build.gradle:
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 30
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
applicationId "es.sonypictures.reactions"
minSdkVersion 24
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
debug {
signingConfig signingConfigs.release
}
release {
signingConfig signingConfigs.release
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'android.arch.work:work-runtime:1.0.0'
implementation project(":fluzo-sdk-2.2.0-PRO")
implementation "androidx.core:core-ktx:+"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.facebook.android:facebook-android-sdk:5.+'
}
Can you also provide detailed log of the error?
Thanks.
That was a cached build, this is a clean one: build.txt
Regarding the error, what I post in the first message is all I get. And it only happens when running the release APK or running flutter in release mode (but then I don't have any logs, it just crashes)
Please try to add the following and update me if anything changes.
buildTypes {
debug {
signingConfig signingConfigs.release
}
release {
shrinkResources false
minifyEnabled false
signingConfig signingConfigs.release
}
}
It's working with these options, thanks!
Maybe minifying or shrinking is removing the json config of Gigya? Is there any way of having it working with shrinking?
Okay. I will investigate further to see why theses options are necessary. The Gigya core SDK currently does not support shrinking (its a feature that will be added). I will see what can be done to prioritize it. Thanks you.
Is not a top priority anyway. I'm closing this issue, but it would be great to have the no shrink option in the documentation.
Thanks for the quick response!
Any news on this? We are shipping our app to production and without shrinking and minify the app size is unmanageable (>200MB).
Shrinking support is not scheduled for Q4 this year. You can try initializing the SDK via the new initSDK feature added last version.
Encountering same issue unfortunately.
This error is produce without shrinking MissingPluginException(No implementation found for method initSdk on channel gigya_flutter_plugin)
This error is produce without shrinking
MissingPluginException(No implementation found for method initSdk on channel gigya_flutter_plugin)
Same here. Have you found a workaround for this?
Not found it in the doc but I checked example app and I fixed the issue by adding manually two dependencies in build.gradle
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
I'm getting this error when creating a release APK:
I've tried configuring Gigya's ApiKey using the two methods available:
https://sap.github.io/gigya-android-sdk/sdk-core/ I've configured the Gigya SDK following the instructions, and it works when running in debug mode.