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

Gradle error #117

Closed
gustavopirela opened this issue Jun 6, 2024 · 3 comments
Closed

Gradle error #117

gustavopirela opened this issue Jun 6, 2024 · 3 comments

Comments

@gustavopirela
Copy link

Description

last year we rolled out our app using STAR printers (TSP100III), we developed our app using React Native (and expo dev client) and your NPM component "react-native-star-io10", everything has been working perfectly with the printers (No issues at all). and we have created several versions for both IOS and Android last ones were back in Feb 2024.

This week we updated the Expo SDK to version 51 and the deployment for IOS went through without any problem, but now I am trying to do the same for Android and I am having this issue in the Gradlew process

Configure project :react-native-star-io10
WARNING: Using flatDir should be avoided because it doesn't support any meta-data formats.
FAILURE: Build failed with an exception.

What went wrong:
Could not determine the dependencies of task ':app:buildReleasePreBundle'.

Could not resolve all task dependencies for configuration ':app:releaseRuntimeClasspath'.
Could not find :stario10:.
Required by:
project :app > project :react-native-star-io10

I realize that based on your documentation your component shouldn't work with expo, however, If you set your Expo app based on "Expo Development Client" your "react-native-star-io10" component was working smoothly until this new EXPO SDK 51.

Your printer

TSP100III

Your development environment

Expo Developer Client SDK 51 (it was working just fine on SDK 46, 47, 48 and 49)
It is still working fine for IOS on SDK 51 the problem occurs only in the gradle process for Android

To Reproduce

set a EXPO project with Development Client add the component and try
eas build -platform android

@can-miki
Copy link
Contributor

can-miki commented Jun 11, 2024

I haven’t tried Expo Application Services (EAS) yet, but when I built it with npx expo start, it was successful.
Setup without Expo Application Services (EAS)

Have you tried the steps above and it still fails?

Please also refer to our READ ME.

@gustavopirela
Copy link
Author

Hi, the "npx expo start" executes the app but the printer still doesn't work.

I found the solution, I always thought the error was generated when I upgraded the Expo SDK to version 51 but in that process, I also upgraded the react-native-star-io10 package from Version 1.4.0 to 1.6.1 I was checking the react-native-star-io10 1.6.1 documentation and this new version requires some changes in the build.gradle that the old version didn't, you need to add this code in the build.gradle for Android implemetations.

allprojects {
repositories {
flatDir {
dirs "$rootDir/../node_modules/react-native-star-io10/android/src/lib"
}
}
}

so I ran an Android prebuild from EAS creating the Android folder, added these lines to build.gradle file. and finally I ran a EAS build and everything worked out!!!

@can-miki
Copy link
Contributor

Thank you for sharing. I'm glad it worked out well.
Thank you for your cooperation!

@can-miki can-miki added Status: resolved Solved or Answered and removed Status: question Further information is requested labels Jun 13, 2024
@can-miki can-miki pinned this issue Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants