Open pravin190786 opened 1 year ago
This is also a big problem for me, I tried changing gradle version and it still fails
Hi @Team is there any fix in progress on this issue
I do have a same problem yesterday..In case if you have not solved this yet..Plese go to note_modules/react-native-bluetooth-escpos-printer/android/build.gradle and change the line that start with http to https or set allowInsecureProtocol= true.
jcenter { url "http//jcenter.bintray.com/" }
to jcenter { url "https//jcenter.bintray.com/" }
OR
jcenter { url "http//jcenter.bintray.com/" ;allowInsecureProtocol = true}
.Change the other lines like that as well.
Hi @CGM-YeMyatThu I have made the changes as per your comments still same issue PFA screenshot Using jcenter { url "https//jcenter.bintray.com/" }
Using jcenter { url "http//jcenter.bintray.com/" ;allowInsecureProtocol = true}
I think what you need to update is ..change all those http to https ..in your case ..Error message changed from jcenter to repo.spring.io ..so changes those lines as well..Seem like there is already a PR for this issue..Please check this out https://github.com/januslo/react-native-bluetooth-escpos-printer/pull/181/files
Thanks @CGM-YeMyatThu for the reply
Now getting some other error
This is "react-native-bluetooth-escpos-printer: ^0.0.5"'s error.
error: cannot find symbol import android.support.v4.app.ActivityCompat;
open node_modules\react-native-bluetooth-escpos-printer\android\src\main\java\cn\jystudio\bluetooth\RNBluetoothManagerModule.java
and replace
android.support.v4.app.ActivityCompat;
android.support.v4.content.ContextCompat;
to
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
visit issues 188
Could not resolve all dependencies for configuration ':react-native-bluetooth-escpos-printer:classpath
open node_modules\react-native-bluetooth-escpos-printer\android\build.gradle
and replace as Pull request
visit issues 198
Now getting some other error
with this error. I just start project again.
This is "react-native-bluetooth-escpos-printer: ^0.0.5"'s error.
error: cannot find symbol import android.support.v4.app.ActivityCompat;
open
node_modules\react-native-bluetooth-escpos-printer\android\src\main\java\cn\jystudio\bluetooth\RNBluetoothManagerModule.java
and replaceandroid.support.v4.app.ActivityCompat; android.support.v4.content.ContextCompat;
to
import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat;
visit issues 188
Could not resolve all dependencies for configuration ':react-native-bluetooth-escpos-printer:classpath
open
node_modules\react-native-bluetooth-escpos-printer\android\build.gradle
and replace as Pull requestvisit issues 198
I followed your answer and now I'm getting this error:
Hi Team, This library is having some issues so i have dropped this library implementation
Now I have used NeptuneLiteAPI I have integrated React Native and android native code for printing and its working fine
Thanks for your responses...!
This is "react-native-bluetooth-escpos-printer: ^0.0.5"'s error.
error: cannot find symbol import android.support.v4.app.ActivityCompat;
open
node_modules\react-native-bluetooth-escpos-printer\android\src\main\java\cn\jystudio\bluetooth\RNBluetoothManagerModule.java
and replaceandroid.support.v4.app.ActivityCompat; android.support.v4.content.ContextCompat;
to
import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat;
visit issues 188
Could not resolve all dependencies for configuration ':react-native-bluetooth-escpos-printer:classpath
open
node_modules\react-native-bluetooth-escpos-printer\android\build.gradle
and replace as Pull request visit issues 198I followed your answer and now I'm getting this error:
Can you try above solution by changing all http to https and also commenting out compile fileTree line below in
node_modules -> react-native-bluetooth-escpos-printer -> android -> build.gradle
After doing that, clean gradle and re run project. Hope it helps
This is "react-native-bluetooth-escpos-printer: ^0.0.5"'s error.
error: cannot find symbol import android.support.v4.app.ActivityCompat;
open
node_modules\react-native-bluetooth-escpos-printer\android\src\main\java\cn\jystudio\bluetooth\RNBluetoothManagerModule.java
and replaceandroid.support.v4.app.ActivityCompat; android.support.v4.content.ContextCompat;
to
import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat;
visit issues 188
Could not resolve all dependencies for configuration ':react-native-bluetooth-escpos-printer:classpath
open
node_modules\react-native-bluetooth-escpos-printer\android\build.gradle
and replace as Pull request visit issues 198I followed your answer and now I'm getting this error:
Can you try above solution by changing all http to https and also commenting out compile fileTree line below in
node_modules -> react-native-bluetooth-escpos-printer -> android -> build.gradle
After doing that, clean gradle and re run project. Hope it helps
Still not working for me. I'm giving up. Does anyone had solutions for bluetooth escpos beside this library ?
I ended up using react-native-thermal-receipt-printer
.
This is "react-native-bluetooth-escpos-printer: ^0.0.5"'s error.
error: cannot find symbol import android.support.v4.app.ActivityCompat;
open
node_modules\react-native-bluetooth-escpos-printer\android\src\main\java\cn\jystudio\bluetooth\RNBluetoothManagerModule.java
and replaceandroid.support.v4.app.ActivityCompat; android.support.v4.content.ContextCompat;
to
import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat;
visit issues 188
Could not resolve all dependencies for configuration ':react-native-bluetooth-escpos-printer:classpath
open
node_modules\react-native-bluetooth-escpos-printer\android\build.gradle
and replace as Pull request visit issues 198I followed your answer and now I'm getting this error:
Can you try above solution by changing all http to https and also commenting out compile fileTree line below in node_modules -> react-native-bluetooth-escpos-printer -> android -> build.gradle
After doing that, clean gradle and re run project. Hope it helps
Still not working for me. I'm giving up. Does anyone had solutions for bluetooth escpos beside this library ?
Change the comment to the following and it works for me
implementation fileTree(dir: 'libs', include: ['*.jar'])
when i build the apk. this error comes ...
Execution failed for task ':react-native-bluetooth-escpos-printer:verifyReleaseResources'.
A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action Android resource linking failed ERROR:C:\Users\A-PC\Desktop\RN-PRINT\rn-3\BluetoothPrinter\node_modules\react-native-bluetooth-escpos-printer\android\build\intermediates\merged_res\release\values\values.xml:2732: AAPT: error: resource android:attr/lStar not found.
Hello community, I have detected that the error when compiling the library is because the repository "jcenter.bintray.com" is no longer working and the other repository "repo.spring.io/plugins-release/" has changed its reference "https://spring.io/blog/2022/12/14/notice-of-permissions-changes-to-repo-spring-io-january-2023"
I have tried to change in this file node_modules\react-native-bluetooth-escpos-printer\android\build.gradle
references to repositories https://jitpack.io/ and https://repo.spring.io/plugins-snapshot/
buildscript {
repositories {
google()
//jcenter { url "http://jcenter.bintray.com/", allowInsecureProtocol = true }
// maven {url "http://repo.spring.io/plugins-release/", allowInsecureProtocol = true }
maven { url "https://jitpack.io/" }
maven {url "https://repo.spring.io/plugins-snapshot/"}
mavenCentral()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
url 'https://maven.google.com'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
}
}
that in both places but when compiling the app it keeps taking the repo "jcenter.bintray.com"
Do you know how they can be changed?
After 2 days will be listing the process of how it worked for me.
"react": "18.2.0", "react-native": "^0.71.8", "react-native-bluetooth-escpos-printer": "https://github.com/januslo/react-native-bluetooth-escpos-printer.git",
After installation and standard configuration in native android, go to build.gradlew and paste the following code, '.../node modules/react-native-bluetooth-escpos-printer/android/build.gradlew'.
code listed below `buildscript { repositories { jcenter { url "https://jcenter.bintray.com/" } maven {url "https://repo.spring.io/plugins-release/"} mavenCentral() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" } maven { url 'https://maven.google.com' } } dependencies { classpath 'com.android.tools.build:gradle:3.1.4' // classpath("com.android.tools.build:gradle:7.0.4") } }
apply plugin: 'com.android.library'
android { compileSdkVersion = 33 buildToolsVersion = "33.0.0"
defaultConfig {
minSdkVersion = 21
targetSdkVersion = 31
versionCode 1
versionName "1.0"
}
lintOptions {
abortOnError false
}
sourceSets {
main {
aidl.srcDirs = ['src/main/java']
}
}
}
repositories { jcenter { url "https://jcenter.bintray.com/" } maven {url "https://repo.spring.io/plugins-release/"} mavenCentral() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" } maven { url 'https://maven.google.com' } }
dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.facebook.react:react-native:+' // From node_modules implementation group: 'com.android.support', name: 'support-v4', version: '27.0.0' implementation "com.google.zxing:core:3.3.0" }`
Right after this process you go to, 'node_modules\react-native-bluetooth-escpos-printer\android\src\main\java\cn\jystudio\bluetooth\RNBluetoothManagerModule.java'
de: android.support.v4.app.ActivityCompat; android.support.v4.content.ContextCompat;
you change to: import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat;
After 2 days will be listing the process of how it worked for me.
"react": "18.2.0", "react-native": "^0.71.8", "react-native-bluetooth-escpos-printer": "https://github.com/januslo/react-native-bluetooth-escpos-printer.git",
After installation and standard configuration in native android, go to build.gradlew and paste the following code, '.../node modules/react-native-bluetooth-escpos-printer/android/build.gradlew'.
code listed below `buildscript { repositories { jcenter { url "https://jcenter.bintray.com/" } maven {url "https://repo.spring.io/plugins-release/"} mavenCentral() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" } maven { url 'https://maven.google.com' } } dependencies { classpath 'com.android.tools.build:gradle:3.1.4' // classpath("com.android.tools.build:gradle:7.0.4") } } apply plugin: 'com.android.library' android { compileSdkVersion = 33 buildToolsVersion = "33.0.0"
defaultConfig { minSdkVersion = 21 targetSdkVersion = 31 versionCode 1 versionName "1.0" } lintOptions { abortOnError false } sourceSets { main { aidl.srcDirs = ['src/main/java'] } }
} repositories { jcenter { url "https://jcenter.bintray.com/" } maven {url "https://repo.spring.io/plugins-release/"} mavenCentral() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" } maven { url 'https://maven.google.com' } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.facebook.react:react-native:+' // From node_modules implementation group: 'com.android.support', name: 'support-v4', version: '27.0.0' implementation "com.google.zxing:core:3.3.0" }`
Right after this process you go to, 'node_modules\react-native-bluetooth-escpos-printer\android\src\main\java\cn\jystudio\bluetooth\RNBluetoothManagerModule.java'
de: android.support.v4.app.ActivityCompat; android.support.v4.content.ContextCompat;
you change to: import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat;
it work for me!!!
After 2 days will be listing the process of how it worked for me.
"react": "18.2.0", "react-native": "^0.71.8", "react-native-bluetooth-escpos-printer": "https://github.com/januslo/react-native-bluetooth-escpos-printer.git",
After installation and standard configuration in native android, go to build.gradlew and paste the following code, '.../node modules/react-native-bluetooth-escpos-printer/android/build.gradlew'.
code listed below `buildscript { repositories { jcenter { url "https://jcenter.bintray.com/" } maven {url "https://repo.spring.io/plugins-release/"} mavenCentral() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" } maven { url 'https://maven.google.com' } } dependencies { classpath 'com.android.tools.build:gradle:3.1.4' // classpath("com.android.tools.build:gradle:7.0.4") } } apply plugin: 'com.android.library' android { compileSdkVersion = 33 buildToolsVersion = "33.0.0"
defaultConfig { minSdkVersion = 21 targetSdkVersion = 31 versionCode 1 versionName "1.0" } lintOptions { abortOnError false } sourceSets { main { aidl.srcDirs = ['src/main/java'] } }
} repositories { jcenter { url "https://jcenter.bintray.com/" } maven {url "https://repo.spring.io/plugins-release/"} mavenCentral() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" } maven { url 'https://maven.google.com' } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.facebook.react:react-native:+' // From node_modules implementation group: 'com.android.support', name: 'support-v4', version: '27.0.0' implementation "com.google.zxing:core:3.3.0" }`
Right after this process you go to, 'node_modules\react-native-bluetooth-escpos-printer\android\src\main\java\cn\jystudio\bluetooth\RNBluetoothManagerModule.java'
de: android.support.v4.app.ActivityCompat; android.support.v4.content.ContextCompat;
you change to: import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat;
it work for me too. Thank you very much!
I am using "react-native": "0.67.4",