android - 将旧项目迁移到Android Studio

标签 android android-studio gradle build.gradle

我是Android Studio的新手。
需要将旧项目迁移到Android Studio

首先我得到这个错误:

android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProcessor'.. Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information ...



enter image description here

然后,当我进行更改并替换我需要的东西时,出现此错误:

'keyboard|screenSize|orientation|' is incompatible with ...



enter image description here
任何对此有想法的人请帮助

最佳答案

对于android-apt错误,请引用:

Incompatible plugins for android-apt after upgrading to Android Studio 2.3

另外,在您的应用gradle文件中的dependencies部分下,将compile更改为implementation。 (编译将在2018年底弃用,您应该改用实现)。

对于第二个,根据图像,您似乎在末尾有一个额外的|(keyboard|screenSize|orientation|)尝试将其删除。

下次请附加代码本身,这将更容易发现问题所在。

关于android - 将旧项目迁移到Android Studio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52630193/

相关文章:

android - 如何显示给定 Android 设备支持的所有 MIME 类型的列表?

android - android studio 中新 xml 布局右下角的邮件图标是什么?

android - 如何通过链接(而不是复制)使应用程序使用其自身文件夹之外的模块?

android - 更新 sdk 版本时构建 Gradle 时出错

android - 使用带有 Gradle 的 git describe 对 Android 构建进行自动版本控制

android - MockK - 左匹配器的匹配模拟签名失败 : [any(), any()]

用于自定义文件扩展名的android Intent 过滤器

Android:添加抽屉导航会导致运行时错误

HAMX 的 Android Studio 错误

firebase - 为什么 Firebase 安装过程会出现错误? flutter