记一次AndroidStudio在Linux环境上的奇葩错误,Argument for @NotNull parameter 'message' of

栏目: Android · 发布时间: 6年前

内容简介:偶然在StackOverFlow看到一个奇葩问题,下面有一个回答:所以就解决了呀,不要用软链接打开就行了,Gradle不支持软链接文件夹。无语

错误信息

Argument for @NotNull parameter 'message' of com/android/tools/idea/gradle/project/sync/GradleSyncState.syncFailed must not be null java.lang.IllegalArgumentException: Argument for @NotNull parameter 'message' of com/android/tools/idea/gradle/project/sync/GradleSyncState.syncFailed must not be null at com.android.tools.idea.gradle.project.sync.GradleSyncState.$$$reportNull$$$0(GradleSyncState.java) at com.android.tools.idea.gradle.project.sync.GradleSyncState.syncFailed(GradleSyncState.java) at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.doPopulateProject(IdeaSyncPopulateProjectTask.java:135) at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.populate(IdeaSyncPopulateProjectTask.java:97) at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.access$000(IdeaSyncPopulateProjectTask.java:39) at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask$1.run(IdeaSyncPopulateProjectTask.java:86) at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:750) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144) at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:395) at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:305) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

情境

之前这几个android项目是在windows上编写的,切换到 linux 环境之后继续做开发。

我把这个分区挂载到 /media/user/data 之后,为了方便使用,创建了一个软链接 /home/user/data/

打开项目是从这个软链接打开的,结果每次都build不了,我还以为我电脑出了什么问题,Google无果。

偶然在StackOverFlow看到一个奇葩问题, # [Android Studio build error on NTFS partition](https://stackoverflow.com/questions/52721989/android-studio-build-error-on-ntfs-partition)

 I’m having problems building apps on Android Studio. Things work fine when the project is on my ext4 partition, but when I created a new one on my NTFS, I encountered this:
 The error disappeared when I restarted Android Studio, but after that I still cannot run my app (the project structure in the sidebar is not displayed properly).  I’m using Android Studio 3.2 on Ubuntu 18.04.1. 

下面有一个回答:

 I figured it out. (By mistake, to be honest…)
 Let’s say you have an NTFS partition mount at /mnt/ntfs, and your project is at /mnt/ntfs/projects/project. Your home partition (ext4) is mounted at /home, your home directory is /home/user and you have a symbolic link at /home/user/projects that points to /mnt/ntfs/projects.
 The reason I (and hopefully you too) have encountered this error is that when using Android Studio’s “Open Project…” option, I provided the symbolic link (/home/user/projects/project). When trying to provide the real path (/mnt/ntfs/projects/project) the gradle sync succeeded.
 So to fix this for now, simply provide the real path. However, this should probably be addressed by IntelliJ or the developers of Gradle. 

解决

所以就解决了呀,不要用软链接打开就行了,Gradle不支持软链接文件夹。无语

记一次AndroidStudio在Linux环境上的奇葩错误,Argument for @NotNull parameter 'message' of

About

记一次AndroidStudio在Linux环境上的奇葩错误,Argument for @NotNull parameter 'message' of

了解更多有趣的操作请关注我的微信公众号:DealiAxy

每一篇文章都在我的博客有收录:blog.deali.cn

记一次AndroidStudio在Linux环境上的奇葩错误,Argument for @NotNull parameter 'message' of


以上所述就是小编给大家介绍的《记一次AndroidStudio在Linux环境上的奇葩错误,Argument for @NotNull parameter 'message' of》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

机器学习算法原理与编程实践

机器学习算法原理与编程实践

郑捷 / 电子工业出版社 / 2015-11 / 88.00

本书是机器学习原理和算法编码实现的基础性读物,内容分为两大主线:单个算法的原理讲解和机器学习理论的发展变迁。算法除包含传统的分类、聚类、预测等常用算法之外,还新增了深度学习、贝叶斯网、隐马尔科夫模型等内容。对于每个算法,均包括提出问题、解决策略、数学推导、编码实现、结果评估几部分。数学推导力图做到由浅入深,深入浅出。结构上数学原理与程序代码一一对照,有助于降低学习门槛,加深公式的理解,起到推广和扩......一起来看看 《机器学习算法原理与编程实践》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码