我正在使用以下链接整合 VISA结帐付款:Android Studio
中的Visa Checkout Integration。
我的项目非常繁重。我是从Eclipse
导入的,已经包含了许多libraries
。在整合签证结帐时,我在 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:2.5.6@aar') {
transitive = true;
}
}
我的libs文件夹包含以下内容:
答案 0 :(得分:0)
我在libs
文件夹中使用了错误的文件。我替换了这一行:
VisaCheckout-Android-SDK-4.3.aar
有了这个并且错误消失了。
VisaCheckout-Android-SDK-2.9.aar
答案 1 :(得分:0)
因为libs文件夹中SDK-AAR文件的名称是小写,与app-gradle中声明的名称相反。
例如, val inputData = sqlContext.table(constants.SOURCE_DB + "." + inputTable).
select(inputTableId, inputTablItemId)
val itemDetails = sqlContext.table(constants.SOURCE_DB + "." + constants.ITEMS_TABLE).
select("item_id", inputTablItemId, "language", "publication_date").
map(row => (row.getInt(0), row.getInt(1), row.getString(2).toInt, cleanDate(row.getString(3)))).
toDF("item_id", inputTablItemId, "language", "publication_date")
import org.apache.spark.sql.Column
val itemColumn : Column = new Column(inputTablItemId)
val familyWithDetails = inputData.join(
itemDetails.select($"item_id",itemColumn.alias("item_family_id"), $"language", $"publication_date"),
itemColumn === $"item_family_id").drop($"item_family_id")
val filteredDF = familyWithDetails.groupBy(inputTableId, inputTablItemId, "language").
agg(max($"publication_date")).withColumnRenamed("max(publication_date)", "publication_date")
val toBeWritten = filteredDF.join(itemDetails.
select($"item_id",
itemColumn.alias("item_family_id"),
$"language".alias("item_language"),
$"publication_date".alias("item_publication_date")),
itemColumn === $"item_family_id" && $"language" === $"item_language" &&
$"publication_date" === $"item_publication_date"
).drop("item_family_id").drop("item_language").drop("item_publication_date").
groupBy(inputTableId, inputTablItemId, "language", "publication_date").agg(first("item_id")).
withColumnRenamed("FIRST(item_id)", "item_id").
withColumn("family_item_id", concat(itemColumn, lit("-"), $"item_id")).
groupBy(inputTableId, "language").agg(groupconcat($"family_item_id")).
withColumnRenamed("(GroupConcat(family_item_id),mode=Complete,isDistinct=false)", "reccs")
代替'visacheckout-android-sdk-4.3'