안드로이드 결제 위젯 SDK Gradle 문제

안녕하세요. 안드로이드 결제 위젯 SDK docs에 나와있는 Gradle을 추가하였는데, 찾을 수 없는 Gradle이라는 오류가 나오고있습니다. 깃허브를 방문해보니 버전이 0.1.1에서 0.1.2로 5일전 업데이트가 되었던데 해당건 때문인지, 아니면 단순 제 실수인지 갈피가 잡히지 않아 질문 남깁니다.
20 Replies
토스페이먼츠 BOT
3/12 이후에 결제 연동을 해보신 분들을 찾습니다!🔎
제품 발전을 위해 설문에 참여해주세요! 추첨을 통해 선물을 드립니다. (1분 소요)
Kimoon Lee
Kimoon Lee2y ago
Gradle 에서 어떤 오류가 난것인지 공유해 주실수 있을까요?
코딩하는노예
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.github.tosspayments:payment-sdk-android:0.1.1. 단순히 해당 버전의 gradle을 찾을 수 없다입니다 아 해당 그래들은 아래 사이트에 있는 내용 그대로 적용헀습니다.
코딩하는노예
결제위젯 Android SDK | 토스페이먼츠 개발자센터
결제위젯 Android SDK를 추가하고 메서드를 사용하는 방법을 알아봅니다.
Kimoon Lee
Kimoon Lee2y ago
우선 해당 버전을 0.1.2로 수정해서 확인해 보실수 있을까요?
코딩하는노예
과거 버전 ( 0.1.0 ) 최신버전 ( 0.1.2 ) 모두 테스해봤었는데 같은 에러 발생했었습니다
이실장
이실장2y ago
확인해보겠습니다.
코딩하는노예
감사합니다
이실장
이실장2y ago
전혀 이상은 없습니다. gradle sync하실 때 에러가 발생하나요?
코딩하는노예
sync는 정상적으로 통과 되고, 앱 빌드시 발생한 에러입니다 현재 프로젝트가 아닌, 빈 프로젝트를 신규로 만들어서 Gradle 추가만 하였을 때도 똑같은 현상이 발생했었습니다. 혹시 실수할만한 부분중 예상가는게 있으실까요?
이실장
이실장2y ago
저도 빌드한번 해볼게요!
코딩하는노예
넵 감사합니다
이실장
이실장2y ago
재현되지 않습니다. implemetation부분 코드 한번 공유해주시겠어요? gradle 전체적으로 한번 주셔도 좋을 것 같아요
코딩하는노예
plugins { id 'com.android.application' id 'kotlin-android' } android { compileSdk 32 defaultConfig { applicationId "com.example.saju" minSdk 26 targetSdk 32 versionCode 1 versionName "1.4" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } } dependencies { implementation 'androidx.core:core-ktx:1.7.0' implementation 'androidx.appcompat:appcompat:1.4.1' implementation 'com.google.android.material:material:1.5.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.3' testImplementation 'junit:junit:4.+' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' // Retrofit implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.retrofit2:converter-gson:2.9.0' // Logging-intercepter implementation 'com.squareup.okhttp3:logging-interceptor:3.12.1' // Tosspayments implementation 'com.github.tosspayments:payment-sdk-android:0.1.1' } 현재 프로젝트 gradle 입니다
이실장
이실장2y ago
plugins {
id 'com.android.application'
id 'kotlin-android'
}

android {
compileSdk 32

defaultConfig {
applicationId "com.example.saju"
minSdk 26
targetSdk 32
versionCode 1
versionName "1.4"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {

implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

// Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'

// Logging-intercepter
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.1'

// Tosspayments
implementation 'com.github.tosspayments:payment-sdk-android:0.1.1'
}
plugins {
id 'com.android.application'
id 'kotlin-android'
}

android {
compileSdk 32

defaultConfig {
applicationId "com.example.saju"
minSdk 26
targetSdk 32
versionCode 1
versionName "1.4"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {

implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

// Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'

// Logging-intercepter
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.1'

// Tosspayments
implementation 'com.github.tosspayments:payment-sdk-android:0.1.1'
}
저희 github 샘플도 보신 것 같은데. Git example app도 빌드 안되시나요?
코딩하는노예
해당 리포는 어디서 찾을 수 있을까요?
이실장
이실장2y ago
GitHub
GitHub - tosspayments/payment-sdk-android
Contribute to tosspayments/payment-sdk-android development by creating an account on GitHub.
이실장
이실장2y ago
이 레포 받으셔서, android studio에서 실행 후 app 빌드하시면 되요
코딩하는노예
아아 이 리포였군요 확인해보겠습니다 감사합니다 😄
토스페이먼츠 BOT
❤️ 기술문의 경험이 어떠셨나요?!
간단히 코멘트 남겨주세요! 제품 발전에 큰 힘이 됩니다.

Did you find this page helpful?