zoukankan      html  css  js  c++  java
  • Android Studio项目中找不到RecyclerView解决办法

    在build.gradle中添加以下内容就解决了

    dependencies {
        implementation 'com.google.android.material:material:1.0.0'
    }

    如果想创建项目时就默认添加了依赖的话,需要修改项目创建的生成模板

    在Android Studiopluginsandroidlib emplatesgradle-projectsNewAndroidModule ootuild.gradle.ftl添加以上内容即可

    dependencies {
        ${getConfigurationName("compile")} fileTree(dir: 'libs', include: ['*.jar'])
        <#if !improvedTestDeps>
        ${getConfigurationName("androidTestCompile")}('com.android.support.test.espresso:espresso-core:+', {
            exclude group: 'com.android.support', module: 'support-annotations'
        })
        </#if>
        <@kt.addKotlinDependencies />
    <#if isInstantApp||isDynamicFeature>
      <#if isBaseFeature>
        <#if monolithicModuleName?has_content>
        application project(':${monolithicModuleName}')
        <#else>
        // TODO: Add dependency to the main application.
        // application project(':app')
        </#if>
      <#else>
        implementation project(':${baseFeatureName}')
      </#if>
    <#else>
      <@shared.watchProjectDependencies/>
      implementation 'com.google.android.material:material:1.0.0'
    </#if>
    }
  • 相关阅读:
    Oracle Form Builder
    springboot post xml
    前台日期字符串 提交到后台 组装entity失败原因
    解析-dom编程
    解析-依赖注入DI
    vs 常用插件
    java 代码块 和 C#的代码块 对比
    ubuntu 常用命令
    ubuntu node
    使用 vs2015 搭建nodejs 开发环境
  • 原文地址:https://www.cnblogs.com/luocodes/p/12924971.html
Copyright © 2011-2022 走看看