相关疑难解决方法(0)

数据绑定重定向到xml在android studio 3.1.2中不起作用

我已经将android studio更新到最新版本(3.1.2),现在当我用ctrl点击BindingClass时,它没有打开它在以前版本中工作的xml文件.我在同一个版本的android studio中创建新项目也尝试了同样的事情,但它正在研究它.

所以我在想我添加了一些错误的依赖项,或者我做错了什么.所以请指导我这个问题.

这是build.gradle

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'realm-android'
apply plugin: 'io.fabric'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId = "xxx.xxx.xxx"
        minSdkVersion 18
        targetSdkVersion 27
        versionCode 9
        versionName "1.0.8"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true
    }
    dexOptions {
        javaMaxHeapSize "4g"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
//            signingConfig signingConfigs.config
            buildConfigField 'Boolean', 'enableCrashlytics', 'false'
        } …
Run Code Online (Sandbox Code Playgroud)

data-binding android android-studio android-databinding

10
推荐指数
1
解决办法
484
查看次数

Gradle项目刷新失败:已经完成

背景:此时我已经与Studio/Gradle争斗了一天左右; 最初有多个PEBKAC错误(即权限和资源限制)已经解决.不幸的是,google-fu让我失败了.

特别是在尝试完成./gradlew clean时未成功完成的错误; 它失败了大约30秒.

我通过吹走有问题的git repo并重新克隆它来暂时"解决"这个问题.我发现错误似乎只发生在特定的分支上(即切换到x_branch,运行'清理项目,'收到错误),但还没有找到原因.在收到错误后尝试切换到另一个分支或返回主站不会将gradle恢复到工作状态; 错误仍然存​​在.

错误: Gradle project refresh failed: Error: Already finished

系统环境: Android Studio 3.1 // Gradle版本171.4250

我的问题:有没有人见过这个错误?这个错误意味着什么,我该如何防止它再次发生?

gradle android-studio

7
推荐指数
2
解决办法
7281
查看次数