Comments (16)
Where is this line supposed to go exactly? I know it says on the proguard file but, according to the docs it says it should be there in the project auto-generated, but in my case is not, do I suppose to create it?
android/app/proguard-rules.pro
Mine looks like this:
#Flutter Wrapper
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.** { *; }
-keep class io.flutter.util.** { *; }
-keep class io.flutter.view.** { *; }
-keep class io.flutter.** { *; }
-keep class io.flutter.plugins.** { *; }
# You might not be using firebase
# -keep class com.google.firebase.** { *; }
-keep class com.builttoroam.devicecalendar.** { *; }
then in android/app/build.gradle
add the following line to buildTypes { release {}}
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
I also use minifyEnabled true
and shrinkResources true
in the same place.
Finally under android/gradle.properties
I have android.enableR8=true
, R8 still respects your proguard rules.
from device_calendar.
I had a similar issue due to Proguard. I fixed it by adding the following line to my Proguard file.
-keep class com.builttoroam.devicecalendar.** { *; }
from device_calendar.
We suspect this is related to the use of Proguard and we'll investigate
from device_calendar.
@thanhhuan1990 can you elaborate more on what the issue is/way - if would help others if we can document what the issue was
from device_calendar.
Thanks @britannio, we planned to do so
from device_calendar.
Thank for your response. I found problem myself but forgot update issue, it's really problem when release with Proguard, sorry for wasting your time.
from device_calendar.
Might be worth adding it to the readme.
from device_calendar.
As an aside, turns out everyone is a proguard user now... This fixed my issue, even though I'm using a standard autogen flutter project with the latest release, etc. Finding it was a lucky stroke. Can how to create a proper proguard file be documented? I added the line from this issue to the file documented here https://flutter.dev/docs/deployment/android#step-1---configure-proguard .
from device_calendar.
This solution worked for me for the Android build, what about the iOS? Because this bug is happening to my app on iOS as well.
from device_calendar.
Where is this line supposed to go exactly? I know it says on the proguard file but, according to the docs it says it should be there in the project auto-generated, but in my case is not, do I suppose to create it?
from device_calendar.
Now I can retrieve calendars in release mode by adding proguard. But for release mode deletion of event is not working.Can anyone help me in this case.I have an important feature to release.
from device_calendar.
@britannio android/app/proguard-rules.pro - this would be inside the flutter app's android/app or inside the plugin's?
from device_calendar.
@britannio android/app/proguard-rules.pro - this would be inside the flutter app's android/app or inside the plugin's?
Inside your Flutter app.
from device_calendar.
I did not have the pro guard files before and I am creating the apk as follows
flutter build apk --release
I have added the solution that they mention but it does not work, it seems that when I generate the apk it does not take the proguard
in the gradle.properties located in android/gradle.properties add this line
android.enableR8=true
in android/app/build.gradle file add
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
and add the file
android/app/proguard-rules.pro
#Flutter Wrapper
-keep class io.flutter.app.** { ; }
-keep class io.flutter.plugin.* { ; }
-keep class io.flutter.util.* { ; }
-keep class io.flutter.view.* { ; }
-keep class io.flutter.* { ; }
-keep class io.flutter.plugins.* { *; }
You might not be using firebase
-keep class com.google.firebase.** { ; }
-keep class com.builttoroam.devicecalendar.* { *; }
from device_calendar.
As someone who just spent a full day on this thinking the problem came from somewhere else, you can follow the steps from @jurgenramirez but do use the proguard file of @britannio, with the endings in .** { *; }.
from device_calendar.
Where is this line supposed to go exactly? I know it says on the proguard file but, according to the docs it says it should be there in the project auto-generated, but in my case is not, do I suppose to create it?
android/app/proguard-rules.pro
Mine looks like this:#Flutter Wrapper -keep class io.flutter.app.** { *; } -keep class io.flutter.plugin.** { *; } -keep class io.flutter.util.** { *; } -keep class io.flutter.view.** { *; } -keep class io.flutter.** { *; } -keep class io.flutter.plugins.** { *; } # You might not be using firebase # -keep class com.google.firebase.** { *; } -keep class com.builttoroam.devicecalendar.** { *; }
then in
android/app/build.gradle
add the following line to buildTypes { release {}}proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
I also use
minifyEnabled true
andshrinkResources true
in the same place.Finally under
android/gradle.properties
I haveandroid.enableR8=true
, R8 still respects your proguard rules.
Works!
from device_calendar.
Related Issues (20)
- Resaving an allDay event causes error HOT 2
- Android Gradle Plugin 7.3 incompatible with device_calendar due to a transitive dependency flutter_native_timezone HOT 21
- Calendar attributes from retrieveCalendars() only present in debug mode HOT 1
- ios flutter: PlatformException(401, The user has not allowed this application to modify their calendar(s), null, null) HOT 10
- add new calendar as read only HOT 1
- iOS 17 PlatformException(500, That account does not allow calendars to be added or removed., null, null) HOT 26
- Add equality to Calendar object HOT 2
- Creating duplicate calendars HOT 1
- Don't create any calendar when calling the instance of the plugin
- INVOKE_CHANNEL_METHOD_ERROR: PlatformException(401, The user has not allowed this application to modify their calendar(s), null, null) HOT 1
- Consider switching to flutter_timezone HOT 10
- The Android Gradle plugin supports only kotlin-android-extensions Gradle plugin version 1.6.20 and higher. HOT 6
- A way to fill "location" field with an address
- How to add event to device calendar with a Datetime type
- Wrong Timezone HOT 4
- Calendar permission not showing HOT 4
- eventId inconsistency between iOS and Android HOT 4
- How do you set the color of the event
- Add eventid customization HOT 2
- Need to add device calendar holidays.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from device_calendar.