react-native-bluetooth-escpos-printer icon indicating copy to clipboard operation
react-native-bluetooth-escpos-printer copied to clipboard

Could not resolve all dependencies for configuration ':react-native-bluetooth-printer:classpath'

Open pravin190786 opened this issue 3 years ago • 21 comments

I am using "react-native": "0.67.4", image

pravin190786 avatar Oct 21 '22 09:10 pravin190786

This is also a big problem for me, I tried changing gradle version and it still fails

chaudev avatar Oct 25 '22 23:10 chaudev

Hi @Team is there any fix in progress on this issue

pravin190786 avatar Oct 26 '22 05:10 pravin190786

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.

cgm-yemyatthu avatar Oct 27 '22 03:10 cgm-yemyatthu

Hi @CGM-YeMyatThu I have made the changes as per your comments still same issue PFA screenshot Using jcenter { url "https//jcenter.bintray.com/" } image

Using jcenter { url "http//jcenter.bintray.com/" ;allowInsecureProtocol = true} image

pravin190786 avatar Oct 27 '22 05:10 pravin190786

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

cgm-yemyatthu avatar Oct 28 '22 04:10 cgm-yemyatthu

Thanks @CGM-YeMyatThu for the reply

pravin190786 avatar Oct 28 '22 15:10 pravin190786

Now getting some other error image

pravin190786 avatar Oct 28 '22 16:10 pravin190786

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

zhenguet avatar Nov 02 '22 00:11 zhenguet

Now getting some other error image

with this error. I just start project again.

zhenguet avatar Nov 02 '22 00:11 zhenguet

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

I followed your answer and now I'm getting this error: image

Roz1c avatar Nov 03 '22 18:11 Roz1c

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...!

pravin190786 avatar Nov 05 '22 13:11 pravin190786

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

I followed your answer and now I'm getting this error: image

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

Screenshot 2022-11-06 at 1 55 53 AM

After doing that, clean gradle and re run project. Hope it helps

amerytcl97 avatar Nov 05 '22 17:11 amerytcl97

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

I followed your answer and now I'm getting this error: image

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

Screenshot 2022-11-06 at 1 55 53 AM

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 ?

r083rt avatar Nov 10 '22 11:11 r083rt

I ended up using react-native-thermal-receipt-printer.

Roz1c avatar Nov 10 '22 11:11 Roz1c

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

I followed your answer and now I'm getting this error: image

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 Screenshot 2022-11-06 at 1 55 53 AM 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'])

FelixGonzalo avatar Apr 26 '23 19:04 FelixGonzalo

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.

amilaupendra avatar Jul 01 '23 16:07 amilaupendra

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?

jcfarias-c avatar Jul 15 '23 21:07 jcfarias-c

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'.

  1. 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;

WerllenTrindade avatar Jul 31 '23 12:07 WerllenTrindade

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'.

  1. 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!!!

ayumixlain avatar Apr 26 '24 17:04 ayumixlain

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'.

  1. 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!

matheusmhq avatar May 22 '24 20:05 matheusmhq