Android Studio 4.1 中的 navigation.json 是什么? [英] What is navigation.json in Android Studio 4.1?
问题描述
我今天刚刚试用了 Android Studio 4.1.我启动了 Android Studio 并创建了空活动,然后使用 android 虚拟设备运行它.然后失败并显示此错误:
I just tried out Android Studio 4.1 today. I started the Android Studio and created empty activity and I run it using the android virtual device. Then it was failed and this error is shown:
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':app:processDebugManifest' (type 'ProcessMultiApkApplicationManifest').
> File 'E:\Project\AndroidLayout\app\build\intermediates\merged_manifest\debug\out\AndroidManifest.xml' specified for property 'mainMergedManifest' does not exist.
当我重建项目时,错误信息显示在这里:
When I rebuild the project, the error message is shown here:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> com.android.manifmerger.ManifestMerger2$MergeFailureException: java.io.FileNotFoundException: E:\Project\AndroidLayout\app\build\intermediates\navigation_json\debug\navigation.json (The system cannot find the path specified)
请注意,这是全新安装和全新项目,代码中没有任何修改.
Note that this is fresh install and fresh project without any modification in the code.
更新 1:
- YouTube:https://www.youtube.com/watch?v=g4w_NOA_UVQ
- 错误报告:https://issuetracker.google.com/issues/170720311莉>
更新 2:
在我将 Android Gradle 插件版本从 4.1.0 降级到 4.0.2 并将 Gradle 版本从 6.5 降级到 6.4.1 之后,它现在可以工作了.所以我的结论是 Android Gradle Plugin 4.1.+ 和 Gradle 6.5.+ 中存在一个错误.
After I downgrade the Android Gradle Plugin version from 4.1.0 to 4.0.2 and the Gradle version from 6.5 to 6.4.1 now it is working. So my conclusion is there is a bug in the Android Gradle Plugin 4.1.+ and Gradle 6.5.+.
推荐答案
我找到了一个临时解决方案:
I find a temporary solution:
在我将 Android Gradle 插件版本从 4.1.0 降级到 4.0.2 并将 Gradle 版本从 6.5 降级到 6.4.1 之后,它现在可以工作了.所以我的结论是 Android Gradle Plugin 4.1.+ 和 Gradle 6.5.+ 中存在一个错误.
After I downgrade the Android Gradle Plugin version from 4.1.0 to 4.0.2 and the Gradle version from 6.5 to 6.4.1 now it is working. So my conclusion is there is a bug in the Android Gradle Plugin 4.1.+ and Gradle 6.5.+.
要降级,只需转到文件 ->项目结构.
In order to downgrade, just go to File -> Project Structure.
这篇关于Android Studio 4.1 中的 navigation.json 是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!