-1

I'm developing an app in Android Studio. If I have a question about code or a bug, which files should I post to make it easy to understand? Should I post every Java and XML file?

1

2 Answers 2

1

If the problem is about the user interface then post the XML code (and Java code is optional).

If the problem is about Gradle synchronisation then post the build.gradle file.

If the application is crashing, usually everyone posts Java and XML code.

1
  • 1
    If it is crashing, what's important is the stack trace, and the relevant lines/parts of the code indicated in the stack trace. Enough code to reproduce the crash. Not just "this is my code and it is crashing." Oct 7, 2020 at 13:13
-3

No, you just have to put the snippet of code where you are facing the issues like in the particular method or at the particular line where you are getting null data. That's it. You don't need to post all the code.

1
  • 2
    Half of the time I see someone post a single method (or worse, a single line), all they get is comments asking for more code because it's impossible to figure it out from what they provided. You need to provide enough code for other people to be able to reproduce the problem, and the amount required is going to depend on the problem. Oct 7, 2020 at 17:15