Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes in release but works fine in debug mode. #48

Closed
sharathGowda12 opened this issue Feb 2, 2020 · 13 comments
Closed

App crashes in release but works fine in debug mode. #48

sharathGowda12 opened this issue Feb 2, 2020 · 13 comments

Comments

@sharathGowda12
Copy link

sharathGowda12 commented Feb 2, 2020

This problem with solution is mentioned already in issue #42

However the solution didn't work for me.

App works fine (even without proguard rules) with flutter run --release but once we build apk & run the app, it didn't work

here is build gradle

buildTypes {
        release {            
            signingConfig signingConfigs.release
            //shrinkResources true
            //minifyEnabled true
            useProguard true
            proguardFiles getDefaultProguardFile('proguard-android.txt'),  'proguard-rules.pro' 
        }
    }

Here is the Proguard rules

-keepclassmembers class * {
@android.webkit.JavascriptInterface ;
}
-keepattributes JavascriptInterface
-keepattributes Annotation
-dontwarn com.razorpay.**
-keep class com.razorpay.** {;}
-optimizations !method/inlining/
-keepclasseswithmembers class * {
public void onPayment*(...);
}

I even tried by removing proguard rules, read & tried all the razorpay official documents, but still the app crashes.

Any workaround is highly appreciated.

@shashikantshaale
Copy link

I'm facing same issue

@shashikantshaale
Copy link

I followed #42 , it worked.

Thank you @Sharath12345678

@Nautiyalsachin
Copy link
Contributor

Closing this issue due to the time elapsed. Please feel free to either re-open the issue or create a
new issue if you have any additional queries.

@arshadm25
Copy link

arshadm25 commented Mar 23, 2020

This problem with solution is mentioned already in issue #42

However the solution didn't work for me.

App works fine (even without proguard rules) with flutter run --release but once we build apk & run the app, it didn't work

here is build gradle

buildTypes {
        release {            
            signingConfig signingConfigs.release
            //shrinkResources true
            //minifyEnabled true
            useProguard true
            proguardFiles getDefaultProguardFile('proguard-android.txt'),  'proguard-rules.pro' 
        }
    }

Here is the Proguard rules

-keepclassmembers class * {
@android.webkit.JavascriptInterface ;
}
-keepattributes JavascriptInterface
-keepattributes Annotation
-dontwarn com.razorpay.**
-keep class com.razorpay.** {;}
-optimizations !method/inlining/
-keepclasseswithmembers class * {
public void onPayment*(...);
}

I even tried by removing proguard rules, read & tried all the razorpay official documents, but still the app crashes.

Any workaround is highly appreciated.

I am facing the same issue even the propguard rules added

@sharathGowda12
Copy link
Author

@arshadm25
Try this,
minifyEnabled false

it worked for me.

@arshadm25
Copy link

arshadm25 commented Mar 24, 2020 via email

@arshadm25
Copy link

@arshadm25
Try this,
minifyEnabled false

it worked for me.

thanks bro it worked for me
but i had to set
shrinkResources false
also

@sanjeevkse
Copy link

@arshadm25
Try this,
minifyEnabled false

it worked for me.

This worked for me too. After so many days of struggle. Thank you so much.

@vinothvino42
Copy link

@arshadm25
Try this,
minifyEnabled false

it worked for me.

Thank you so much! It worked for me.

@achieverprince
Copy link

It is strange for me
Dev mode crashes (even app start)
But --variant=release works fine

@mitalpatel5944
Copy link

not working. why these issue closed ?

@achieverprince
Copy link

after gradlew clean and increasing minsdk to android 5 worked, it worked.

@rohitbarge
Copy link

I am getting this

No signature of method: build_amwhym3pk76xdwrm3lwmfm5m.android() is applicable for argument types: (build_amwhym3pk76xdwrm3lwmfm5m$_run_closure2) values: [build_amwhym3pk76xdwrm3lwmfm5m$_run_closure2@47532e3]

on follow above steps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants