star-micronics / react-native-star-io10

react-native-star-io10 is a library for supporting application development for Star Micronics devices.
Other
82 stars 54 forks source link

[Windows]: Unable to build on windows #116

Open manage-some opened 1 month ago

manage-some commented 1 month ago

Description

I have tried all possible ways to build my app on windows. However StarIO is the only library that conflicts in the build process. I have windows 11 and

Your device where the bug occurs

: Project StarIO10 is not compatible with native (native,Version=v0.0). Project StarIO10 supports: uap10.0.18362 (UAP,Version=v10.0.18362)

Screenshot 2024-05-23 023902 Screenshot 2024-05-23 024100

manage-some commented 1 month ago

Any Update?

Waleed065 commented 1 month ago

I'm facing the same issue with a new react native app build for windows. React Native Windows Works fine without StarIO

can-miki commented 1 month ago

I was able to build the sample. Please let us know the detailed situation.

  1. Is your react-native environment fully set up? →For Windows version, please refer to here.

  2. Do you able to build the sample? If you have some trouble, please also refer to here.

  3. Do you get an error when importing into your app? I would like to know the situation in that the error occurred.

For reference, this is my environment:

System: OS: Windows 11 10.0.22621 CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz Memory: 8.21 GB / 15.81 GB Binaries: Node: version: 20.11.0 path: C:\Program Files\nodejs\node.EXE Yarn: version: 1.22.19 path: C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: version: 10.2.4 path: C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: AllowDevelopmentWithoutDevLicense: Enabled AllowAllTrustedApps: Enabled Versions:

  • 10.0.18362.0
  • 10.0.19041.0
  • 10.0.22621.0 IDEs: Android Studio: AI-223.8836.35.2231.10811636 Visual Studio: Not Found Languages: Java: version: 17.0.11 path: C:\Program Files\Microsoft\jdk-17.0.11.9-hotspot\bin\javac.EXE Ruby: Not Found npmPackages: "@react-native-community/cli": Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: installed: 0.73.6 wanted: 0.73.6 react-native-windows: installed: 0.73.11 wanted: 0.73.11 npmGlobalPackages: "react-native": Not Found Android: hermesEnabled: true newArchEnabled: false iOS: hermesEnabled: Not found newArchEnabled: Not found
manage-some commented 1 month ago

We already have a working app for android and ios that supports star. I followed the react-native-windows documentation and initiated the windows folder. But it always gave the above error.

What i've tried

juliesaia-vendora commented 2 weeks ago

Any update on this? Trying to build on windows 11 getting the same issue

juliesaia-vendora commented 2 weeks ago

Seems to be an incompatibility between C++ react native projects (the default) and this C# module. Looks like we're in the bad part of this yellow square 😅

image

I was able to successfully build by switching my project to C#, theoretically shouldn't introduce any incompatibilities according to that matrix. Here were my steps:

  1. Delete windows folder
  2. npx --yes react-native-windows-init --overwrite --language="cs"
  3. yarn install
  4. In node_modules\react-native-star-io10\windows\StarIO10\StarIO10.csproj, change the two instances of 18362 to 19041 https://github.com/microsoft/react-native-windows/issues/9057
  5. npx react-native run-windows