Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pravin190786 opened this issue Oct 21, 2022 · 20 comments

Comments

@pravin190786
Copy link

pravin190786 commented Oct 21, 2022

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

@pravin190786 pravin190786 changed the title Getting below issue Could not resolve all dependencies for configuration ':tp-react-native-bluetooth-printer:classpath' Oct 21, 2022
@pravin190786 pravin190786 changed the title Could not resolve all dependencies for configuration ':tp-react-native-bluetooth-printer:classpath' Could not resolve all dependencies for configuration ':react-native-bluetooth-printer:classpath' Oct 21, 2022
@chaudev
Copy link

chaudev commented Oct 25, 2022

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

@pravin190786
Copy link
Author

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

@cgm-yemyatthu
Copy link

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.

@pravin190786
Copy link
Author

pravin190786 commented Oct 27, 2022

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

@cgm-yemyatthu
Copy link

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

@pravin190786
Copy link
Author

Thanks @cgm-yemyatthu for the reply

@pravin190786
Copy link
Author

Now getting some other error
image

@zhenguet
Copy link

zhenguet commented Nov 2, 2022

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
Copy link

zhenguet commented Nov 2, 2022

Now getting some other error image

with this error. I just start project again.

@Roz1c
Copy link

Roz1c commented Nov 3, 2022

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

@pravin190786
Copy link
Author

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

@amerytcl97
Copy link

amerytcl97 commented Nov 5, 2022

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

@r083rt
Copy link

r083rt commented Nov 10, 2022

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 ?

@Roz1c
Copy link

Roz1c commented Nov 10, 2022

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

@FelixGonzalo
Copy link

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'])

@amilaupendra
Copy link

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.

@jcfarias-c
Copy link

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?

@WerllenTrindade
Copy link

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;

@ayumixlain
Copy link

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

@matheusmhq
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests