我正在整合VISA結帳使用以下鏈接付款:Visa Checkout Integration in Android Studio
。在集成VISA結賬時出現錯誤
我的項目很重。我已從Eclipse
導入它,其中已包含許多libraries
。雖然整合VISA結賬,我加在gradle這個文件下面,及其相關的庫:
compile(name:'VisaCheckout-Android-SDK-4.3', ext:'aar')
當我之前沒有任何庫執行this代碼,我沒有得到任何錯誤。
然而,當我在我現有的應用程序在運行Lollipop
的代碼,我得到了一個空白頁面不上單擊硬件後退按鈕甚至做出迴應。
我得到一些不尋常的錯誤,如:
事件類com.visa.internal.ˌ
沒有爲事件類de.greenrobot.event註冊用戶註冊用戶號.NoSubscriberEvent
先前失敗的一流拒絕重新初始化的java.lang.Class
在Kitkat
中,該應用崩潰,顯示爲java.lang.NoClassDefFoundError: com.google.android.gms.analytics.GoogleAnalytics
,(因爲Google Analytics已集成到我的項目中)。
這是我的gradle這個文件:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.fitcompany.fitness_enthusiasts"
minSdkVersion 11
targetSdkVersion 20
}
buildTypes {
release {
multiDexEnabled true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
repositories {
flatDir { dirs 'libs'}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile project(':slidingMenu')
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services:4.0.30'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.paypal.sdk:paypal-android-sdk:2.14.2'
compile(name:'VisaCheckout-Android-SDK-4.3', ext:'aar')
compile files('libs/volley.jar')
compile files('libs/gson-2.3.1.jar')
compile files('libs/HockeySDK-3.5.0.jar')
compile files('libs/httpclient-android-4.3.3.jar')
compile files('libs/ksoap2-android-assembly-3.1.0-jar-with-dependencies.jar')
compile files('libs/libGoogleAnalyticsServices.jar')
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile('com.crashlytics.sdk.android:crashlytics:[email protected]') {
transitive = true;
}
}
我libs文件夾包含以下內容:
- eventbus-2.4.0.jar
- GSON-2.3.1.jar
- HockeySDK -3.5.0.jar
- ksoap2-機器人組裝-3.1.0-罐與 - dependencies.jar
- libGoogleAnalyticsServices.jar
- okhttp-2.5.0.jar
- 改裝的1.9.0.jar
- volley.jar
- YouTubeAndroidPlayerApi.jar
- VisaCheckout-Android的SDK-4.3.aar