内容简介:偶然在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不支持软链接文件夹。无语
About
了解更多有趣的操作请关注我的微信公众号:DealiAxy
每一篇文章都在我的博客有收录:blog.deali.cn
以上所述就是小编给大家介绍的《记一次AndroidStudio在Linux环境上的奇葩错误,Argument for @NotNull parameter 'message' of》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
数据结构、算法与应用
(美)Sartaj Sahni / 汪诗林、孙晓东、等 / 机械工业出版社 / 2000-01 / 49.00
本书是关于计算机科学与工程领域的基础性研究科目之一――数据结构与算法的专著。 本书在简要回顾了基本的C++ 程序设计概念的基础上,全面系统地介绍了队列、堆栈、树、图等基本数据结构,以及贪婪算法、分而治之算法、分枝定界算法等多种算法设计方法,为数据结构与算法的继续学习和研究奠定了一个坚实的基础。更为可贵的是,本书不仅仅介绍了理论知识,还提供了50多个应用实例及600多道练习题。 本书......一起来看看 《数据结构、算法与应用》 这本书的介绍吧!