Home>
History What I did

While developing an application with AndroidAStudio, I decided to release the source code on GitHub, installed Git from within AndroidStudio, and linked it with my GitHub account.
I only knew that GitHub was able to manage source code versions in advance, and I set up the repository while reading English, and committed and merged.
It was executed from VCS Operation Popup, Update Project or Commit was performed from the button on the toolbar.

These are all run from the AndroidStudio application and do not use the Git command line.

Change happened

Although we were able to link the GitHub account and the source code of the app we were developing, the layout file and image data that we were editing so far were flat converted, moved, or moved to the asset folder I moved to a place where I couldn't understand the audio file that I put.
I don't know how to edit flat converted files.
Even after building, it is said that Task 'assemble' not found in root project 'App name'.

Sound file path
Before merging App name \ app \ src \ main \ assets \ Audio file.mp3
After merging App name \ app \ build \ intermediates \ merged_assets \ debug \ mergeDebugAssets \ out \ audio file.mp3
File path of layout file
Before merging App name \ app \ src \ main \ res \ layout \ Layout file.xml
After merging App name \ app \ build \ intermediates \ res \ merged \ debug \ Layout file.xml.flat
Question
  1. Is this change caused by merging?
  2. How to open and return flat files
    When it was forcibly opened as text data, alphabets etc. were displayed correctly, but symbols such as I tried opening with UTF-8 after merging with UTF-8 character code at the time of development
  3. How to revert the project itself before merging

Thank you for any of these.

What you learned after investigating

The extension .flat is a text file, and other resources such as the layout file have not disappeared.
Is there a layout file etc. in the folder named merged?
Even if I check it, I can only find a way to link with GitHub of AndroidStudio.

Recognition of merging is to combine multiple versions, and when there is only one version, I thought that it wouldn't cause any problems.

Version etc.

AndroidStudio 3.3
Android Emulator revision 28.0.25
Android SDK Platform-Tools revision 28.0.2

  • Answer # 1

    I don't know what happens.

    The AndroidStudio build directory is a working directory that can be used when generating apk files.
    Such working directories are generally not included in version control.

    For

    git, describe those files and directories in a file called.gitignoreand set it to be ignored by git.
    The explanation will be a little longer, so please search for "android studio gitignore" first.


    For the phenomenon that is happening now, the build directory is just the working directory as I said, so if you are afraid of deleting…, rename it and try building again.