Gradle > Task :app:generateSafeArgsDebug FAILED

Issue

I have a kotlin project and i used Navigation component.
in my local machine i can use gradle build and it’s work ok.
but in my remote ubuntu when i call gradle build i get this message
can anyone help me

[email protected]:/home/test2/WooShop# gradle build
Task :app:generateSafeArgsDebug FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:generateSafeArgsDebug’.

    org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not \u0 (position: START_DOCUMENT seen \u0… @1:1)

  • Try:
    Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output. Run with –scan to get full insights.

gradle build

Solution

I have this problem in Android Project with Navigation component and I have navigation dir with empty navigation xml file just remove navigation dir and rebuild then I can build.

Answered By – Wiwat Fongkan

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published