Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is navigation.json in Android Studio 4.1?

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

like image 940
Afrig Aminuddin Avatar asked Oct 13 '20 10:10

Afrig Aminuddin


People also ask

What is gradle Android studio?

Android Studio uses Gradle, an advanced build toolkit, to automate and manage the build process, while allowing you to define flexible custom build configurations. Each build configuration can define its own set of code and resources, while reusing the parts common to all versions of your app.

What is the current Android studio version?

Android Studio Chipmunk | 2021.2. Android Studio - Chipmunk | 2021.2. 1 Patch 2 is now available in the Stable channel. If you already have an Android Studio build on the Stable channel, you can get the update by clicking Help > Check for Update (Android Studio > Check for Updates on macOS).

What is the use of JSON in Android?

JSON is shorter, quicker and easier way to interchange data from server. JSON is great success and most of the API available support JSON format. Android Provide us four different classes to manipulate JSON data. These classes are JSONObject, JSONArray, JSONStringer and JSONTokenizer.

How to parse a JSON file in Android Studio?

To parse a JSON file in Android, follow the following steps: To create a new project in Android Studio please refer to How to Create/Start a New Project in Android Studio. Note that select Kotlin as the programming language. Go to the activity_main.xml file which represents the UI of the application.

What is JSON parsing?

JSON Parsing Tutorial With Example In Android Studio [Step by Step] JSON stands for JavaScript Object Notation. It is structured, light weight, human readable and easy to parse. It’s a best alternative to XML when our android app needs to interchange data from server. XML parsing is very complex as compare to JSON parsing.

How to get JSON data if it starts with []?

Sometimes JSON data start with [. We then need to use the getJSONArray () method to get the data. Similarly, if it starts with {, then we need to use the getJSONobject () method. The syntax of the JSON file is as following:


Video Answer


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

like image 196
Afrig Aminuddin Avatar answered Oct 28 '22 03:10

Afrig Aminuddin


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

like image 27
Yung Robinson Avatar answered Oct 28 '22 05:10

Yung Robinson


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.

like image 4
Marielle Fivez Avatar answered Oct 28 '22 05:10

Marielle Fivez


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
like image 3
Tof EloChris Avatar answered Oct 28 '22 03:10

Tof EloChris


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

like image 1
tang tang Avatar answered Oct 28 '22 05:10

tang tang