我正在尝试将PayU Payment Gateway集成到我的Android应用中。我试过了
来自https://developer.payumoney.com/android/链接的示例应用
工作正常。付款后我会收到付款并发邮件
这意味着商家设置部分是正确的。但是当我尝试
一旦我将依赖项集成到我的应用程序中
gradle中的``com.payumoney.sdkui:plug-n-play:1.5.0'',我收到错误
“ Android资源编译失败
app \ build \ intermediates \ incremental \ mergeDebugResources \ merged.dir \ values \ values.xml:7825:错误:资源'attr / rowHeight'的重复值带有配置''。”在放置此依赖项之前,该应用程序与没有错误。
我尝试了在stackoverflow和其他Internet站点上找到的所有可能的操作,例如从'com.payumoney.sdkui:plug-n-play'依赖项中排除组等,但是没有任何效果。我遇到了同样的错误。
这是我的应用gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.events.jashna.jashnaeventandroid"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
configurations {
compileClasspath {
resolutionStrategy.force 'com.payumoney.sdkui:plug-n-play:1.5.0'
}
}
dependencies {
implementation 'androidx.multidex:multidex:2.0.1'
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
// implementation ('androidx.appcompat:appcompat:1.1.0-rc01')//{
// exclude group: 'com.payumoney.sdkui', module: "plug-n-play"
// }
// implementation ('com.google.android.material:material:1.0.0-
//beta01'){
// exclude group: 'com.payumoney.sdkui', module: "plug-n-play"
// }
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-
alpha4'
implementation ('androidx.cardview:cardview:1.0.0')
implementation ('androidx.recyclerview:recyclerview:1.1.0-beta02')
implementation ('androidx.leanback:leanback:1.0.0-beta01')
implementation 'de.hdodenhof:circleimageview:2.1.0'
// libraries for web service --->
// compile 'org.glassfish.jersey.containers:jersey-container-
//servlet:2.14'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
// <---
//Add Swipe card library
implementation 'com.huxq17.android:SwipeCardsView:1.3.5'
implementation 'com.squareup.picasso:picasso:2.5.2'
// compile files('libs/activation.jar')
// compile files('libs/additionnal.jar')
// compile files('libs/mail.jar')
implementation files('libs/activation.jar')
implementation files('libs/additionnal.jar')
implementation files('libs/mail.jar')
// implementation 'com.sun.mail:android-mail:1.6.0'
implementation files('libs/android-async-http-1.4.4.jar')
// implementation 'javax.mail:javax.mail-api:1.5.3'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.google.firebase:firebase-core:17.0.1'
implementation 'com.google.firebase:firebase-database:18.0.1'
implementation 'com.google.firebase:firebase-firestore:20.2.0'
implementation 'com.google.firebase:firebase-auth:18.1.0'
// implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.firebase:firebase-messaging:19.0.1'
implementation('com.google.android.gms:play-services-base:16.1.0') {
exclude group: "com.android.support", module: "support-v4"
// exclude group: "com.payumoney.sdkui", module: "plug-n-play"
}
// image upload
implementation 'net.gotev:uploadservice:2.1'
// notification count (badges)
implementation 'com.github.arturogutierrez:badges:1.0.5@aar'
implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
// implementation('com.crashlytics.sdk.android:crashlytics:2.6.5@aar')
{
// transitive = true;
// }
implementation ('com.payumoney.sdkui:plug-n-play:1.5.0'){
// transitive = true;
// exclude group: 'com.google.android.material', module: 'material'
// exclude group: 'androidx.appcompat', module: 'appcompat'
exclude group: 'androidx.leanback', module: 'leanback'
exclude group: 'com.google.android.gms:play-services-base'
exclude group: 'androidx.recyclerview', module: 'recyclerview'
exclude group: 'com.google.code.gson', module: 'gson'
exclude group: 'androidx.cardview', module: 'cardview'
}
}
apply plugin: 'com.google.gms.google-services'
有评论的部分是我尝试没有成功的部分。而且,我的项目中没有attr.xml,我也尝试过- 1-清洁项目 2-重建 3-使缓存无效/重新启动 等所有这些都失败了。谁能让我知道如何解决这个问题?