Good day,
I am trying to use the Reader SDK on android, everything as the examples indicate … but it just sends me this error.
Failed to resolve: com.squareup.sdk.reader: reader-sdk- {sq **********************}: 1.3.10
Affected Modules: app
My credentials in gradle.properties
SQUARE_READER_SDK_APPLICATION_ID = {sq ************************************************ ****}
SQUARE_READER_SDK_REPOSITORY_PASSWORD = {fwk7 ********************************************** ***********************}
Am I doing something wrong in this step ??
I work in Mexico.
sjosey
August 10, 2020, 7:31pm
2
It shouldn’t stop you from installing the SDK, but just FYI Reader SDK only works in the United States, so it will fail to work even if you do manage to get it to build unfortunately. There’s no sandbox support, so there’s no way to test it in another country at this time, either.
The development I’m doing will be implemented in the USA.
I have tried to make the SDK work from my gradle as the square page indicates, will there be a way to obtain more details of my error in the android console?, Or could I have problems due to my location in Mexico?
gradle.properties*
kotlin.code.style=official
SQUARE_READER_SDK_APPLICATION_ID={sq**********}
SQUARE_READER_SDK_REPOSITORY_PASSWORD={fw******************}
//////////////////////////////////////////////////////
build.gradle*
repositories {
google()
jcenter()
maven {
url ‘https://dl.google.com/dl/android/maven2 ’
}
maven {
url "https://sdk.squareup.com/android"
credentials {
username SQUARE_READER_SDK_APPLICATION_ID
password SQUARE_READER_SDK_REPOSITORY_PASSWORD
}
}
}
///////////////////////////////////////////////////////////////
build.gradle :app
//SQUARE__
implementation “com.squareup.sdk.reader:reader-sdk-$SQUARE_READER_SDK_APPLICATION_ID:$readerSdkVersion”
runtimeOnly “com.squareup.sdk.reader:reader-sdk-internals:$readerSdkVersion”
Solution, for my case:
It looks like your app-level build.gradle
isn’t looking in the Square repository for the Reader SDK artifact.
ERROR: Failed to resolve: com.squareup.sdk.reader:reader-sdk-...
Fix
Between the android {}
and dependencies {}
blocks in your app-level build.gradle
file, add the Square repository.
android {
// ...
}
repositories {
google()
maven {
url "https://sdk.squareup.com/android"
credentials {
username SQUARE_READER_SDK_APPLICATION_ID
password SQUARE_READER_SDK_REPOSITORY_PASSWORD
}
}
jcenter()
}
dependencies {
// ...
}