离线
Unsupported method: BaseConfig.getApplicationIdSuffix().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.
还是出现了错误.
离线
https://stackoverflow.com/questions/44546849/unsupported-method-baseconfig-getapplicationidsuffix
build.gradle:
classpath 'com.android.tools.build:gradle:1.2.3'
改为 ==>
classpath 'com.android.tools.build:gradle:2.2.1'
离线
sync failed 14s 834ms
Minimum supported Gradle version is 2.14.1. Current version is 2.2.1.
Please fix the project's Gradle settings.
Fix Gradle wrapper and re-import project
Gradle settings
失败真是无处不在.
离线
build.gradle 改成这样:
buildscript {
repositories {
jcenter()
//google()maven {
url 'https://maven.google.com'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
可以通过编译,生成了apk文件, 不知道为何,手机插上了,adb 设备也有了,但是 android studio 无法调试, adb shell命令也无法连接。
离线
https://github.com/betomaluje/Mi-Band
Note: this is thanks to the new Android Studio that uses jCenter instead of MavenCentral. To see this, you can open your main build.gradle file, and under the repositories you should see jcenter(). If not, add this as a repository
allprojects {
repositories {
mavenCentral()
maven {
url 'https://dl.bintray.com/betomaluje/maven/'
}
}
}
作者貌似有提醒了?
离线
https://github.com/betomaluje/Mi-Band/search?utf8=%E2%9C%93&q=KEY_BT_ADDRESS+&type=
public static final String KEY_BT_ADDRESS = "bt_address";
会不会是这个地址呢?
离线
14:51:57 Gradle sync started
14:52:24 Gradle sync completed
14:52:24 Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]
14:52:33 Gradle build finished in 9s 346ms
14:54:09 Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:compileDebugSources, :app:compileDebugAndroidTestSources, :app:compileDebugUnitTestSources]
14:54:19 Gradle build finished in 9s 879ms
14:54:25 Executing tasks: [:app:assembleDebug]
14:54:32 Gradle build finished in 7s 105ms
14:54:32 Build APK
APK(s) generated successfully.
Show in Explorer
换了一台电脑,折腾很久,可以编译,
but, 并没有以生成 apk 文件, 小白入坑真难.
离线