android - Android 北极狐的 InvocationTargetException | M1 Apple 硅片上的 2020.3.1 arm64
问题描述
在使用kapt
(例如 Room)在我的 M1 Apple Silicon 上构建我的 Android 项目期间
Android Studio Arctic Fox | 2020.3.1 Beta 1 arm64
..
Android Studio Arctic Fox | 2020.3.1 Beta 5 arm64
Android Studio Bumblebee | 2021.1.1 Canary 2 aarch64
和
Android Studio Arctic Fox | 2020.3.1 Beta 5
Build #AI-203.7717.56.2031.7360992, built on May 14, 2021
Runtime version: 11.0.10+0-b96-7249189 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.4
我遇到
Execution failed for task ':FFTSpectrumLib:kaptDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction
> java.lang.reflect.InvocationTargetException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
我不知道如何使它与快速 aarch64 一起工作!
使用x86它可以工作
Android Studio Arctic Fox | 2020.3.1 Beta 1 x86
解决方案
根本原因是 Room 2.3.0
This https://github.com/xerial/sqlite-jdbc/issues/450向我指出了解决方案
解决方案 A
添加
kapt "org.xerial:sqlite-jdbc:3.34.0"
它包括这个https://github.com/xerial/sqlite-jdbc/releases/tag/3.32.3.3
解决方案 B
只需使用房间2.4.0-alpha03
推荐阅读
- r - 检查 write_xlsx 是否已正确执行并且文件是否已写入
- amazon-ec2 - 将 scylla 集群切换到大型 aws 实例的简单方法
- sql - 为什么没有在 SQL Server 2008 (Visual Studio 2010) 中创建用户实例?
- python - 是否可以将两个预先存在的数据库合并到一个前端?
- c# - C#异步LCD写
- angular - Angular github 页面路径具有重复的应用程序名称
- django - 如何在保存模型方法 DJANGO 中获取绝对 url?
- angular - Prime NG 的可编辑表上的奇怪行为
- perl - Perl:Windows 与 Unix 上的 exec()
- uilocalnotification - iOS 13本地通知未发送