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
root@sarvdata:/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.
Got the same error. Did a search with grep -r "\x00" app/src/main/res
and a app/src/main/res/navigation/.DS_Store file came up. Deleted it and everything played out.
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.
I had the same error, after proper checking, I realized there was an error in my navigation graph's code. The error was gone after correctly formatting and correcting the error. I suggest you check your navigation graph's code for any misspellings or errors and if you are not using navigation then delete the graph entirely. The error is shown below.
WRONG:
<fragment
android:id="@+id/SecondFragment"
android:name="com.example.opeyemiabdulsalam.carowners.CarOwnersFragment"
android:label="@string/second_fragment_label"
tools:layout="@layout/car_owners_list">
<action
android:id="@+id/action_SecondFragment_to_FirstFragment"
app:destination="@id/FirstFragment" />
<argument
android:name="filterValue"
app:argType="com.example.opeyemiabdulsalam.data.Filter"
<!-- app:popEnterAnim="@anim/slide_in_left"-->
pop
app:popExitAnim="@anim/slide_out_right"/>
</fragment>
RIGHT:
<fragment
android:id="@+id/SecondFragment"
android:name="com.example.opeyemiabdulsalam.carowners.CarOwnersFragment"
android:label="@string/second_fragment_label"
tools:layout="@layout/car_owners_list">
<action
android:id="@+id/action_SecondFragment_to_FirstFragment"
app:destination="@id/FirstFragment" />
<argument
android:name="filterValue"
app:argType="com.example.opeyemiabdulsalam.data.Filter"
app:popEnterAnim="@anim/slide_in_left"
app:popExitAnim="@anim/slide_out_right"/>
</fragment>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With