V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
easylee
V2EX  ›  Android

《Kotlin_安卓叕掉坑》

  •  
  •   easylee · 2018-01-23 00:30:34 +08:00 · 4462 次点击
    这是一个创建于 2279 天前的主题,其中的信息可能已经有所发展或是发生改变。

    叕掉坑,百度一些方法都试过,无奈依然无解,所以又厚颜无耻来这里请教大家了。

    看着资料对撸代码,资料中这么写的 “"" 显示的列表我们使用 RecyclerView,所以你需要在 build.gradle 中 增加一个新的依赖: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile "com.android.support:appcompat-v7:$support_version" compile "com.android.support:recyclerview-v7:$support_versio n" ... } """

    按照资料填完后,IDE 报错有问题,识别不了我填的,想了想肯定是依赖问题,我直接百度如何添加依赖,按照网上相关资料在 dependencies 手动添加了,后改成 ”“" dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile "com.android.support:appcompat-v7:26.0.2" compile "com.android.support:recyclerview-v7:26.0.2" } """ SYNC 后不会报错,但是还是用不了 RecyclerView ,为红色显示 Unresolved reference... 有没有能够指导一下的老哥,AS 使用中每天看资料敲代码还没查 BUG 的时间多......

    easylee
        1
    easylee  
    OP
       2018-01-23 00:31:23 +08:00
    不会上传图片,排版还出问题,抱歉....
    YellowLittleDog
        2
    YellowLittleDog  
       2018-01-23 08:00:14 +08:00 via Android
    我是不明白这个和 Kotlin 有什么关系
    lrannn
        3
    lrannn  
       2018-01-23 09:04:59 +08:00
    这个跟 Kotlin 没关系,我觉得应该是你依赖的库问题,没弄好
    KNOX
        4
    KNOX  
       2018-01-23 13:05:46 +08:00 via iPhone
    不是 Kotlin 的问题,是你自己的问题,AS 什么版本? Gradle 什么版本?看的什么资料?
    easylee
        5
    easylee  
    OP
       2018-01-23 23:44:03 +08:00
    抱歉,我并没有说是 kotlin 的问题,并且我很喜欢 kotlin,我只是在学习 kotlin 去开发安卓。
    这帖子可不可以关闭啊?我用的是 as3.0,凌晨还没解决问题索性换到书中《 kotlin for android developers 》所用的老版本,异常解决了。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2762 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 10:09 · PVG 18:09 · LAX 03:09 · JFK 06:09
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.