Skip to content

Fix bug print bitmap on android#1

Merged
john-dugan merged 8 commits into
masterfrom
matthewparavati/fix-bug-print-bitmap-on-android
Feb 4, 2022
Merged

Fix bug print bitmap on android#1
john-dugan merged 8 commits into
masterfrom
matthewparavati/fix-bug-print-bitmap-on-android

Conversation

@matthewparavati
Copy link
Copy Markdown

- pulls in changes from the open PR infoxicator#66 on the forked react-native-star-prnt repo
Comment thread android/src/main/java/net/infoxication/reactstarprnt/RNStarPrntModule.java Outdated
@oliveirasWell
Copy link
Copy Markdown

@matthewparavati here on my end I have this error when trying to build android

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings
685 actionable tasks: 659 executed, 26 up-to-date
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/oliveiraswell/repos/client-app/node_modules/expo-av/android/src/main/java/expo/modules/av/player/PlayerData.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/oliveiraswell/repos/client-app/node_modules/expo-notifications/android/src/main/java/expo/modules/notifications/notifications/presentation/builders/ExpoNotificationBuilder.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings
Note: /Users/oliveiraswell/repos/client-app/node_modules/@intercom/intercom-react-native/android/src/main/java/com/intercom/reactnative/IntercomModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
/Users/oliveiraswell/repos/client-app/node_modules/@popmenu/star-print/android/src/main/java/net/infoxication/reactstarprnt/RNStarPrntModule.java:599: error: exception IOException is never thrown in body of corresponding try statement
                } catch (IOException e) {
                  ^
Note: /Users/oliveiraswell/repos/client-app/node_modules/@popmenu/star-print/android/src/main/java/net/infoxication/reactstarprnt/RNStarPrntModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':popmenu_star-print:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 10s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/oliveiraswell/repos/client-app/node_modules/expo-av/android/src/main/java/expo/modules/av/player/PlayerData.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/oliveiraswell/repos/client-app/node_modules/expo-notifications/android/src/main/java/expo/modules/notifications/notifications/presentation/builders/ExpoNotificationBuilder.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings
Note: /Users/oliveiraswell/repos/client-app/node_modules/@intercom/intercom-react-native/android/src/main/java/com/intercom/reactnative/IntercomModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
/Users/oliveiraswell/repos/client-app/node_modules/@popmenu/star-print/android/src/main/java/net/infoxication/reactstarprnt/RNStarPrntModule.java:599: error: exception IOException is never thrown in body of corresponding try statement
                } catch (IOException e) {
                  ^
Note: /Users/oliveiraswell/repos/client-app/node_modules/@popmenu/star-print/android/src/main/java/net/infoxication/reactstarprnt/RNStarPrntModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':popmenu_star-print:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 10s

    at makeError (/Users/oliveiraswell/repos/client-app/node_modules/execa/index.js:174:9)
    at /Users/oliveiraswell/repos/client-app/node_modules/execa/index.js:278:16
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async runOnAllDevices (/Users/oliveiraswell/repos/client-app/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:5)
    at async Command.handleAction (/Users/oliveiraswell/repos/client-app/node_modules/@react-native-community/cli/build/index.js:186:9)

@matthewparavati
Copy link
Copy Markdown
Author

@oliveirasWell Thanks for finding that. I guess I forget to rebuild after adding that exception back in. I have switched it to a general exception and it is building for me now, if you want to try again

Copy link
Copy Markdown

@oliveirasWell oliveirasWell left a comment

Choose a reason for hiding this comment

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

@matthewparavati after the last import and a lot of ./gradlew clean it seems to work fine

@john-dugan
Copy link
Copy Markdown

@matthewparavati Looks like there's a merge conflict with the other PR too

@matthewparavati matthewparavati marked this pull request as draft February 1, 2022 18:08
@matthewparavati
Copy link
Copy Markdown
Author

Moving this back to a draft. These changes attempt decode a base64 string, which we currently don't pass from the app, so when trying to print, it complains about bad base64. I need to see if we a) should be using a different command from the app, instead of appendBitmap or if we just need to update the printStar function to encode the uri

@matthewparavati matthewparavati marked this pull request as ready for review February 2, 2022 16:05
Copy link
Copy Markdown

@bp1295 bp1295 left a comment

Choose a reason for hiding this comment

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

Tested on Android

@john-dugan john-dugan merged commit 3bbef4b into master Feb 4, 2022
@john-dugan john-dugan deleted the matthewparavati/fix-bug-print-bitmap-on-android branch February 4, 2022 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants