所以我做了一个可穿戴的应用程序,我可以用屏幕上的按钮和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) 我正在尝试在Mac上设置Android开发环境.
我的出发点是Java 1.7我相信.所以我安装了android studio并打开了我想要构建的项目.它说:
Error:Buildtools 24.0.1 requires Java 1.8 or above. Current JDK version is 1.7.
Run Code Online (Sandbox Code Playgroud)
所以我去下载Java 1.8 u101并安装了它.没运气.然后我删除了Android Studio并重新安装并重新安装了SDK,但仍然没有运气.
我的Java Control Pannel说:Java 8更新101.输出/usr/bin/java:
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
Run Code Online (Sandbox Code Playgroud)
输出 /usr/bin/javac
javac 1.8.0_101
Run Code Online (Sandbox Code Playgroud)
我做错了什么?