我正在尝试创建一个使用Facebook SDK的新Android应用程序,我正在使用最新版本的所有东西,所以我使用Android Studio 0.4.0和新的Gradle编译系统以及从下载的SDK的最新版本Facebook的.
我试图按照Facebook开发者页面中的说明操作:https: //developers.facebook.com/docs/getting-started/facebook-sdk-for-android-using-android-studio/3.0/但 没有运气,因为说明不适用于基于Gradle的Android Studio.
我也尝试按照Scott Barta在android工作室中使用facebook sdk的说明但没有运气,当"与Gradle文件同步项目"不起作用的第7步时,我收到此错误:
无法刷新Gradle项目.您正在使用旧的,不受支持的Gradle版本.请使用1.9或更高版本.请在项目的Gradle设置或项目的Gradle包装器中指向支持的Gradle版本(如果适用).
我试图修改build.gradle文件并更改类路径行:
classpath 'com.android.tools.build:gradle:0.6.+'
Run Code Online (Sandbox Code Playgroud)
至:
classpath 'com.android.tools.build:gradle:0.7.+'
Run Code Online (Sandbox Code Playgroud)
并且还将compileSdkVersion,buildToolsVersion,minSdkVersion和targetSdkVersion更改为我项目中的值,但不起作用.
谁能帮我?谢谢!
编辑:我今天更新到Android 0.4.2,但新版本没有运气.
我的gradle-wrapper.properties文件正在使用Gradle 1.9:
#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.9-all.zip
Run Code Online (Sandbox Code Playgroud)
这是我用来编译Facebook库的build.gradle文件:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
}
}
apply plugin: 'android-library'
dependencies {
compile 'com.android.support:support-v4:+'
}
android {
compileSdkVersion 19
buildToolsVersion "19.0.1"
defaultConfig {
minSdkVersion 7
targetSdkVersion 19
}
sourceSets {
main {
manifest.srcFile …Run Code Online (Sandbox Code Playgroud) 我在Google Play中发布了一个Android应用,其中包含应用内订阅.我有月度和年度订阅,我已经在开发者控制台中以这种方式配置它:
问题是:当用户打算订阅时,Google Play会以这种方式显示支付网关:
为什么说如果每月订阅,他们每天收费19.99美元?
这是订阅用户每天收到的发票:
在我的代码中,我没有定义与价格相关的任何内容,就是这样:
inappbilling.subscribe(function (data) {
$rootScope.logThis("inappbilling plugin - subscribe: " + JSON.stringify(data), "info", "inappbilling", "subscribe");
subscriptionDone(data);
}, function (errorInfo) {
$rootScope.logThis("inappbilling plugin ERROR - subscribe: " + JSON.stringify(errorInfo), "error", "inappbilling", "subscribe");
subscriptionError(errorInfo);
}, subscriptionType.productId);
Run Code Online (Sandbox Code Playgroud)
我只是指定了正确的订阅ID.我怎样才能将付款设置为monhtly而不是每天?
谢谢!
android google-play google-play-services in-app-subscription google-play-developer-api
对于使用CryptoJS加密某些东西浪费了很多时间,我感到非常沮丧,一段时间之后,我意识到每次使用相同的输入加密结果都是不同的!这怎么可能?
这是我的代码,您可以检查是否为真:https : //jsfiddle.net/z5dg623q/1/
<script>
function encrypt() {
document.getElementById("stringOutput").value = CryptoJS.AES.encrypt("lorem ipsum", "hAPgT2mj0ZzD1epO").toString();
}
</script>
<textarea id="stringOutput" cols="100" rows="10"></textarea>
<button type="button" onClick="encrypt()">Encrypt that!</button>
Run Code Online (Sandbox Code Playgroud)
有谁能够帮助我?