januslo / react-native-bluetooth-escpos-printer

React-Native plugin for the bluetooth ESC/POS & TSC printers.
MIT License
351 stars 411 forks source link

This library not compatible with gradle 7.2 or newer #178

Open Frankiz123 opened 2 years ago

Frankiz123 commented 2 years ago

I found Issue in this library for the android it dosen't work on gradle above 7 you have to replace gradle wrapper with this distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip and use ./gradlew clean in android folder this will work

usfslk commented 2 years ago

Thanks for sharing, I had the same issue when compiling the app, this is the error I was getting

Could not resolve all dependencies for configuration ':react-native-bluetooth-escpos-printer:classpath'. Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'BintrayJCenter(http://jcenter.bintray.com/)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.2/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details.

Minimum supported Gradle version is 6.7.1.

The file path is ./android/gradle/wrapper/gradle-wrapper.properties

Replace this line

distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-all.zip

Frankiz123 commented 2 years ago

Thanks for sharing, I had the same issue when compiling the app, this is the error I was getting

Could not resolve all dependencies for configuration ':react-native-bluetooth-escpos-printer:classpath'. Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'BintrayJCenter(http://jcenter.bintray.com/)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.2/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details.

Minimum supported Gradle version is 6.7.1.

The file path is ./android/gradle/wrapper/gradle-wrapper.properties

Replace this line

distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-all.zip

@usfslk i think this library is not supported with star printers Model Star Micronics TSP143IIIBi.

chukiatt commented 2 years ago

I had same too

abhay-rana commented 2 years ago

but it is giving me this error :-- `FAILURE: Build failed with an exception.

BUILD FAILED in 893ms

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. FAILURE: Build failed with an exception. `

kasunchamara commented 1 year ago

Update this line

jcenter { url "http://jcenter.bintray.com/"; allowInsecureProtocol = true } maven {url "http://repo.spring.io/plugins-release/"; allowInsecureProtocol = true}

work for me this change