我无法运行该项目,我已检查过很多网站&堆栈溢出没有任何问题。 未找到Gradle DSL方法:' compile()& 构建文件可能缺少Gradle插件' 。
的build.gradle(APP)
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "info.devexchanges.bluetoothchatapp"
minSdkVersion 21
targetSdkVersion 21
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:21'
compile 'com.android.volley:volley:1.0.0'
}
的build.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
apply plugin: 'announce'
apply plugin: 'build-announcements'
compile 'com.android.volley:volley:1.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
答案 0 :(得分:1)
查找并替换此代码
private final BroadcastReceiver discoveryFinishReceiver = new BroadcastReceiver(){ @覆盖 public void onReceive(Context context,Intent intent){ String action = intent.getAction();
$ git clone https://aur.archlinux.org/trace-cmd.git
$ cd trace-cmd
$ makepkg -si
};
希望你能得到这个!