什么是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插件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插件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.+.
要降级,只需转到File->项目结构.
In order to downgrade, just go to File -> Project Structure.
这篇关于什么是Android Studio 4.1中的navigation.json?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!