热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

数据绑定重定向到xml在androidstudio3.1.2中不起作用

如何解决《数据绑定重定向到xml在androidstudio3.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'
        }
        debug {
            buildConfigField 'Boolean', 'enableCrashlytics', 'false'
        }
    }
    flavorDimensions "default"
    productFlavors {
        basic {
//            applicationIdSuffix ".basic"
//            versionName "0.1.9"
        }
        admin {
//            applicationIdSuffix ".admin"
//            versionName "0.1.9-admin"
        }
    }
    dataBinding {
        enabled = true
    }
    packagingOptions {
        exclude 'META-INF/maven/com.squareup.okhttp3/okhttp/pom.properties'
        exclude 'META-INF/maven/com.squareup.okhttp3/okhttp/pom.xml'
        exclude 'META-INF/maven/com.squareup.okio/okio/pom.properties'
        exclude 'META-INF/maven/com.squareup.okio/okio/pom.xml'
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation(name: 'wikitudesdk', ext: 'aar')
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation 'com.android.support:appcompat-v7:27.1.0'
    implementation 'com.android.support:design:27.1.0'
    implementation 'com.google.android.gms:play-services-maps:11.6.0'
    implementation 'com.google.android.gms:play-services-location:11.6.0'
    implementation 'com.google.android.gms:play-services-analytics:11.6.0'
    testImplementation 'junit:junit:4.12'
    implementation 'com.squareup.okhttp3:okhttp:3.5.0'
    implementation('com.squareup.retrofit2:retrofit:2.1.0') {
        exclude module: 'okhttp'
    }
    implementation('com.squareup.retrofit2:adapter-rxjava:2.1.0') {
        exclude module: 'okhttp'
    }
    implementation('com.squareup.retrofit2:converter-gson:2.1.0') {
        exclude module: 'okhttp'
    }
    implementation('com.squareup.okhttp3:logging-interceptor:3.5.0') {
        exclude module: 'okhttp'
    }
    implementation 'com.google.dagger:dagger:2.8'
    annotationProcessor 'com.google.dagger:dagger-compiler:2.8'
    implementation 'io.reactivex:rxandroid:1.2.1'
    implementation 'io.reactivex:rxjava:1.1.6'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.google.android:flexbox:0.3.0-alpha2'
    annotationProcessor 'org.parceler:parceler:1.1.6'
    implementation 'org.parceler:parceler-api:1.1.6'
    implementation 'com.google.guava:guava:20.0'
    implementation 'me.zhanghai.android.materialprogressbar:library:1.3.0'
    implementation 'com.facebook.fresco:fresco:1.1.0'
    implementation 'com.facebook.fresco:animated-gif:1.1.0'
    implementation 'com.github.bumptech.glide:glide:3.7.0'
    implementation 'com.caverock:androidsvg:1.2.1'
    implementation 'joda-time:joda-time:2.9.3'
    implementation 'com.google.code.gson:gson:2.8.0'
    implementation 'io.realm:android-adapters:1.3.0'
    implementation 'com.mobsandgeeks:android-saripaar:2.0.2'
    implementation 'org.greenrobot:eventbus:3.0.0'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.jakewharton.timber:timber:4.5.1'
    implementation('com.crashlytics.sdk.android:crashlytics:2.7.1@aar') {
        transitive = true
    }
    implementation 'com.github.JakeWharton:ViewPagerIndicator:2.4.1'
    implementation 'com.google.android.exoplayer:exoplayer:r2.2.0'
    implementation 'com.github.faruktoptas:FancyShowCaseView:0.1.0'
    implementation 'com.google.firebase:firebase-messaging:11.6.0'
    implementation 'com.facebook.android:facebook-android-sdk:4.28.0'

    implementation 'com.shawnlin:number-picker:2.4.4'
    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'com.google.maps.android:android-maps-utils:0.5'
    implementation 'com.intuit.sdp:sdp-android:1.0.4'
    implementation 'com.google.firebase:firebase-perf:11.6.0'
    implementation 'com.facebook.stetho:stetho:1.5.0'
    implementation 'com.uphyca:stetho_realm:2.1.0'
    //    debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'

    //    releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'

    //    testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
}

repositories {
    flatDir {
        dirs 'libs'
    }
    maven { url 'https://maven.fabric.io/public' }
}

apply plugin: 'com.google.gms.google-services'

这是Project Level build.gradle

buildscript {
    repositories {
        jcenter()
        maven { url 'https://maven.fabric.io/public' }
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath "io.realm:realm-gradle-plugin:3.0.0"
        classpath 'io.fabric.tools:gradle:1.+'
        classpath 'com.google.gms:google-services:3.1.1'
        classpath 'me.tatarka:gradle-retrolambda:3.6.1'
        classpath 'com.google.firebase:firebase-plugins:1.1.4'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven {url "https://jitpack.io"}
        maven {url 'https://github.com/uPhyca/stetho-realm/raw/master/maven-repo'}
        google()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

非常感谢.


推荐阅读
  • 在IDEA中运行CAS服务器的配置方法
    本文介绍了在IDEA中运行CAS服务器的配置方法,包括下载CAS模板Overlay Template、解压并添加项目、配置tomcat、运行CAS服务器等步骤。通过本文的指导,读者可以轻松在IDEA中进行CAS服务器的运行和配置。 ... [详细]
  • SAPC/4HANA与人工智能和增强现实(AR)技术结合的又一个创新案例
    今天这篇迟到的文章,来自我的同事Aviva。去年SAPC4HANA发布之后,SAP的从业者们可能或多或少都读过一些来自SAP官方渠道,比如微信公众号"SA ... [详细]
  • ndk开发!34岁安卓开发大叔感慨,不吃透都对不起自己
    前言众所周知,移动开发已经来到了后半场,为了能够在众多开发者中脱颖而出,我们需要对某一个领域有深入地研究与心得,对于And ... [详细]
  • EPICS Archiver Appliance存储waveform记录的尝试及资源需求分析
    本文介绍了EPICS Archiver Appliance存储waveform记录的尝试过程,并分析了其所需的资源容量。通过解决错误提示和调整内存大小,成功存储了波形数据。然后,讨论了储存环逐束团信号的意义,以及通过记录多圈的束团信号进行参数分析的可能性。波形数据的存储需求巨大,每天需要近250G,一年需要90T。然而,储存环逐束团信号具有重要意义,可以揭示出每个束团的纵向振荡频率和模式。 ... [详细]
  • 推荐系统遇上深度学习(十七)详解推荐系统中的常用评测指标
    原创:石晓文小小挖掘机2018-06-18笔者是一个痴迷于挖掘数据中的价值的学习人,希望在平日的工作学习中,挖掘数据的价值, ... [详细]
  • 自动轮播,反转播放的ViewPagerAdapter的使用方法和效果展示
    本文介绍了如何使用自动轮播、反转播放的ViewPagerAdapter,并展示了其效果。该ViewPagerAdapter支持无限循环、触摸暂停、切换缩放等功能。同时提供了使用GIF.gif的示例和github地址。通过LoopFragmentPagerAdapter类的getActualCount、getActualItem和getActualPagerTitle方法可以实现自定义的循环效果和标题展示。 ... [详细]
  • CF:3D City Model(小思维)问题解析和代码实现
    本文通过解析CF:3D City Model问题,介绍了问题的背景和要求,并给出了相应的代码实现。该问题涉及到在一个矩形的网格上建造城市的情景,每个网格单元可以作为建筑的基础,建筑由多个立方体叠加而成。文章详细讲解了问题的解决思路,并给出了相应的代码实现供读者参考。 ... [详细]
  • 本文介绍了Android 7的学习笔记总结,包括最新的移动架构视频、大厂安卓面试真题和项目实战源码讲义。同时还分享了开源的完整内容,并提醒读者在使用FileProvider适配时要注意不同模块的AndroidManfiest.xml中配置的xml文件名必须不同,否则会出现问题。 ... [详细]
  • 本文讨论了在openwrt-17.01版本中,mt7628设备上初始化启动时eth0的mac地址总是随机生成的问题。每次随机生成的eth0的mac地址都会写到/sys/class/net/eth0/address目录下,而openwrt-17.01原版的SDK会根据随机生成的eth0的mac地址再生成eth0.1、eth0.2等,生成后的mac地址会保存在/etc/config/network下。 ... [详细]
  • 深入理解Kafka服务端请求队列中请求的处理
    本文深入分析了Kafka服务端请求队列中请求的处理过程,详细介绍了请求的封装和放入请求队列的过程,以及处理请求的线程池的创建和容量设置。通过场景分析、图示说明和源码分析,帮助读者更好地理解Kafka服务端的工作原理。 ... [详细]
  • intellij idea的安装与使用(保姆级教程)
    intellijidea的安装与使用(保姆级教程)IntelliJ在业界被公认为最好的java开发工具,尤其在智能代码助手、代码自动提示、重构、JavaEE支持、各类版本工具(gi ... [详细]
  • 1Lock与ReadWriteLock1.1LockpublicinterfaceLock{voidlock();voidlockInterruptibl ... [详细]
  • 4.3.2Tuple是否可以跨页面PostgreSQLusesafixedpagesize(commonly8kB),anddoesnotallowtuplestospanmult ... [详细]
  • HashMap的规约JavaDocs中HashMap的spec是这么写的:Hashtablebased implementationoftheMapinterface.Thisim ... [详细]
  • 如果说以比特币为代表的货币区块链技术为1.0,以以太坊为代表的合同区块链技术为2.0,那么实现了完备的权限控制和安全保障的Hyperledger项目毫无疑问代表着区块链技术3.0 ... [详细]
author-avatar
温柔的诱惑2012_431
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有