Activity not opened in release build.
It is working completely fine in debug build, but in release build its not opening.
Same here.
It is working completely fine in debug build, but in release build it's not opening.
Did you find any solution for this?
I found a solution for it. This is an issue of the image_picker itself, not the image_cropper. You have to downgrade the gradle version for it.
classpath 'com.android.tools.build:gradle:3.6.3'
try to update proguard-rules.pro
proguard-rules.pro file
-keep class io.flutter.plugin.editing.** { *; }
-keep class androidx.lifecycle.DefaultLifecycleObserver
-dontwarn com.yalantis.ucrop**
-keep class com.yalantis.ucrop** { *; }
-keep interface com.yalantis.ucrop** { *; }
build.gradle file
buildTypes {
release {
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
same here when I use the camera to get a picture it works but not with image picking from the gallery.
image_cropper: ^1.4.0
image_picker: ^0.7.4
W/View (31661): requestLayout() improperly called by androidx.appcompat.widget.AppCompatTextView{d8f7c1c V.ED..... ......ID 497,26-582,72 #7f0700c0 app:id/text_view_scale} during layout: running second layout pass
I/zygote (31661): JIT allocated 56KB for compiled code of void android.view.View.<init>(android.content.Context, android.util.AttributeSet, int, int)
getting this in debug mode is this normal
尝试更新 proguard-rules.pro
proguard-rules.pro 文件
-keep class io.flutter.plugin.editing.** { *; } -keep class androidx.lifecycle.DefaultLifecycleObserver -dontwarn com.yalantis.ucrop** -keep class com.yalantis.ucrop** { *; } -keep interface com.yalantis.ucrop** { *; }build.gradle 文件
buildTypes { release { shrinkResources false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' signingConfig signingConfigs.release } }
正解