android - Android Studio 3.6.3:遵循关于如何制作音板的旧教程(错误:AlertController is not public in androidx.appcompat.app)
问题描述
我在学习本教程时遇到了问题。这是一个在 Android Studio 3.6.3 中制作 Soundboard 的教程
问题出在这行代码中:
import androidx.appcompat.app.AlertController;
这是错误:
error: AlertController is not public in androidx.appcompat.app; cannot be accessed from outside package
import androidx.appcompat.app.AlertController;
可能问题出在这里:6:27,教程的创建者使用这个旧代码添加了 recyclerview 支持库:
compile: 'com.android.support:recyclerview-v7:23.4.0'
我改用这段代码:
implementation "androidx.recyclerview:recyclerview:1.1.0"
有人可以帮我解决错误吗?
解决方案
推荐阅读
- reactjs - Hooks 和 Redux 传奇
- jquery - 如何通过在ajax中按回车按钮从输入数组中获取一个值?
- ios - 如何使用 iOS 相机拍照上传到 S3 存储桶
- apache-kafka - 限制 kafka 主题分区仅分布在部分代理上
- spacy - Rasa NLU ,intent = null 对于单个单词的句子
- java - 控制器和 Servlet 有什么区别?
- javascript - 尽管 try-catch-block:单击 Selenium/JavaScript 中的未定义元素时发生错误
- android - SearchView 建议适配器未在 Android 中弹出
- angular - TypeError:无法使用玩笑读取未定义的属性“原型”
- python-3.x - 由 ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required')) 引起