What is navigation.json in Android Studio 4.1?

Viewed 14501

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.

UPDATE 1:

  1. Youtube: https://www.youtube.com/watch?v=g4w_NOA_UVQ
  2. Bug Report: https://issuetracker.google.com/issues/170720311

UPDATE 2:

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.+.

6 Answers

I find a temporary solution:

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.

Had same issue. Moving project files to ntfs drive fixed it.

Downgrading 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; works for me as well. Now app is no longer experiencing building errors.Thanks. Error message was :

A problem was found with the configuration of task ':app:processDebugManifest' (type 'ProcessMultiApkApplicationManifest').

File 'F:\NietsPastApp\app\build\intermediates\merged_manifest\debug\out\AndroidManifest.xml' specified for property 'mainMergedManifest' does not exist.

Thanks for help, downgrade it's ok. just for other who search the file :

gradle 4.0.2 change here : /build.gradle

    dependencies {
    classpath 'com.android.tools.build:gradle:4.0.2'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    }

gradle 6.4.1 : gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip

File -> Project Structure. reduce your build tools version to 29 i tried it's work

In my case and for kotlin I have downgraded kotlin version from 1.4.32 to 1.4.31

Related