Nathan SUTRE
Nathan SUTRE

Reputation: 1

Build apk in expo app in a bare workflow using react-native-datawedge-intents

I would like to know how to create an independent apk file (i.e. it does not run thanks to an expo server) which allows the scan of my Zebra TC21 device to be detected?

For context, well I tried to do all my requests to the datawedge API in react-native without using a "bare workflow" but I couldn't detect the scan by doing so, whereas by putting the same in my MainActivity.kt, well it works. End it works, it's a big word because when I try to create an apk of my application by doing the command

eas build -p android --profile preview

then while downloading the apk, I realize that my kotlin code inside the android folder was not taken into account. I don't really see how to do it...

I then tried to build the apk directly from the android folder by doing :

./gradlew assembleRelease

but when I do so I have a problem with the react-native-datawedge-intents module:

Execution failed for task ':react-native-datawedge-intents:compileReleaseJavaWithJavac'.

Could not resolve all files for configuration ':react-native-datawedge-intents:androidJdkImage'.

Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.

Namely, I use Java 21 and Gradle 8.5 since I saw that both were compatible.

My profile in DataWedge is well configured and I can make the scan work if I execute it by doing

npm start 

(after doing eas build run:android).

I also tried to change the java versions (I tried with java 8 and java 11 and changing gradle depending the java version, but not successfully)

Thanks in advance

Upvotes: 0

Views: 139

Answers (0)

Related Questions