所以我做了一个可穿戴的应用程序,我可以用屏幕上的按钮和MessageListenerService来控制机器人车.在尝试构建项目之后,我遇到了一些问题,它要求我从SDK中安装"Android Support Repository",我已经拥有了.我在SO(链接)上发现了另一个类似的问题, 它有一种解决方案,但现在它说
"错误:已经应用了java插件,但它与Android插件不兼容"
这是我的可穿戴模块中的build.gradle
apply plugin: 'com.android.application'
apply plugin: 'java'
sourceCompatibility = JavaVersion.VERSION_1_6 //these two lines
targetCompatibility = JavaVersion.VERSION_1_6 //are the only ones that matter
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
}
signingConfigs {
release {
keyAlias 'C:\\Users\\Riekelt\\coolie.jks'
keyPassword 'cut-out'
storeFile file('path/to/release.keystore')
storePassword 'cut-out'
}
}
defaultConfig {
applicationId "robowheel.robond"
minSdkVersion 20
targetSdkVersion 20
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig …
Run Code Online (Sandbox Code Playgroud) 我正在尝试从API中获取文本,该API只返回一串文本((此处))并且在响应中将问题抛出.发布时,它出来了[object Response]
,并console.log
没有显示我想要的文本.
我正在使用的代码:
fetch('http://taskinoz.com/gdq/api').then(
function(response) {
console.log(response);
throttledSendMessage(channel, response);
return response;
})
.catch(function(error) {
throttledSendMessage(channel, "An error has occured");
})
Run Code Online (Sandbox Code Playgroud)
可在此处找到日志
谢谢你和我一起找,找不到解决方案:/