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

Upgrade to PSPDFKit framework 5.0.1 #4

Merged
merged 15 commits into from
Nov 21, 2018

Conversation

simoarpe
Copy link
Contributor

@simoarpe simoarpe commented Nov 20, 2018

Resolves #3

Resolves https://github.com/PSPDFKit/pspdfkit-flutter/issues/2

This PR upgrades PSPDFKit framework version to 5.0.1 and adds other minor improvements:

  • Adds environment field to pubspec.yaml required as of Dart 2
  • Adds compatible options to enable desugaring required for compiling with Java 8
  • Improves template for local.properties.sample
  • Upgrades Android Gradle plugin version to 3.2.1
  • Removes the abi filter workaround previously added to fix a known bug
  • Updates the main README.md
  • Updates the example project README.md
  • Removes commented code and other minor cleanups

Signed-off-by: Simone Arpe <simon.arpe@gmail.com>
Signed-off-by: Simone Arpe <simon.arpe@gmail.com>
Signed-off-by: Simone Arpe <simon.arpe@gmail.com>
Signed-off-by: Simone Arpe <simon.arpe@gmail.com>
Signed-off-by: Simone Arpe <simon.arpe@gmail.com>
Signed-off-by: Simone Arpe <simon.arpe@gmail.com>
Signed-off-by: Simone Arpe <simon.arpe@gmail.com>
Signed-off-by: Simone Arpe <simon.arpe@gmail.com>
Remove ndk.dir
@simoarpe simoarpe self-assigned this Nov 20, 2018
Signed-off-by: Simone Arpe <simon.arpe@gmail.com>
Signed-off-by: Simone Arpe <simon.arpe@gmail.com>
sdk.dir=/path/to/your/Android/sdk
flutter.sdk=/path/to/your/flutter/sdk
pspdfkit.password=YOUR_PASSWORD_GOES_HERE
flutter.buildMode=debug
```

5. Open `myapp/android/app/build.gradle` and modify line 27 from `minSdkVersion 16` to `minSdkVersion 19`.
5. Open `myapp/android/app/build.gradle` and modify `compileSdkVersion` from `27` to `28`, `minSdkVersion` from `16` to `19`, `targetSdkVersion` from `27` to `28` and add compile options to enable desugaring
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also mention that we require androidGradlePluginVersion to be 3.2.1.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make sure to mention it somewhere, but a change for this is not required, the right version is already picked up.

@simoarpe simoarpe merged commit 09a2a73 into master Nov 21, 2018
@simoarpe simoarpe deleted the simone/upgrade-to-pspdfkit-5.0.1 branch November 21, 2018 17:27
radazzouz pushed a commit that referenced this pull request Jan 10, 2020
Having spaces in the assert name caused the following exception on both iOS and Android:

```
[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: Unable to load asset: PDFs/PSPDFKit Image Example.jpg
#0      PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:221:7)
<asynchronous suspension>
#1      _MyAppState.extractAsset (package:pspdfkit_example/main.dart:53:65)
#2      _MyAppState.showImage (package:pspdfkit_example/main.dart:75:41)
#3      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
#4      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11)
#5      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5)
#6      BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:236:7)
#7      GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
#8      GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:222:20)
#9      GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
#10     GestureBinding<…>
[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: Unable to load asset: PDFs/PSPDFKit Image Example.jpg
#0      PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:221:7)
<asynchronous suspension>
#1      _MyAppState.extractAsset (package:pspdfkit_example/main.dart:53:65)
#2      _MyAppState.showImage (package:pspdfkit_example/main.dart:75:41)
#3      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
#4      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11)
#5      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5)
#6      BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:236:7)
#7      GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
#8      GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:222:20)
#9      GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
#10     GestureBinding<…>
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to PSPDFKit 5 for Android Update Dart SDK for Flutter engine to the latest version Dart 2.1.0-dev.5.0
3 participants