Can I delete these files without anything happening?

4

I have an application on Android that is very busy and 90% of the total is because of 3 files that I do not know if they can be deleted or what would happen if I erase them.

The first one is fileSnapShots.bin, located in .gradle / 2.10 / taskArtifacts, it occupies 22 MB, what happens if I delete it? Can I do without him? It's very heavy ...

The second and third are app-debug and app-debug-unaligned, located in app \ build \ outputs \ apk, do they both work? 9MB between the two

The third one is mockable-android-23, located in \ build \ generated, I guess this is useful to run the app in android studio, but it weighs almost 23MB.

  

Can any of this be erased?

    
asked by Rf Mvs 11.09.2016 в 16:48
source

2 answers

3

I answer your questions:

  • All the contents of the .gradle folder within the project directory can be deleted but it will be created again when you build the project.
  • As for the folder \build , it contains files that are generated when compiling, you can delete the contents of this folder that contains in turn \generated e \intermediates .

    If you delete this folder you will see considerably reduced space on your disk , but remember that when compiling they are generated again.

  • The files contained in the folder app\build\outputs\apk , are .apk generated a non-aligned which you can align using the tool Zipalign , and the other, an aligned .apk which is a candidate to upload to the playstore but only if it was signed with your production Keystore, this is very important.
answered by 12.09.2016 / 17:07
source
3

I suppose that if you delete it, nothing happens, but it means that it will take much longer to generate and compile the project.

I usually use two development spaces on different computers and when I want to move an app I just copy build.gradle and src , everything else generates it. Sometimes the file build.gradle has given me error, but I solve it with creating a blank project and I modify the values from the other one.

Edited

About what you ask about the fate of the%% of% if you want to upload the app to google play services you have to upload the app\build\outputs\apk that you get with signing the apk.

Generate Apk to upload to Google Play

To publish an App to release-aligned you must compile / build it in Google Play mode In the lower left part of release there is a tab Android-studio open it and select Build variants

The apk must be signed and aligned, for this you must generate a file release

Menu keystore pulseas Build->Generate Signed Apk and fill the form.

Things to keep in mind:

  • Alias: Put your name or corporation style: Create New
  • Password: the password to sign the apk.
  • Validity years: I put 100

Then you can give the apps.tunombreo.corporacion.com once the explorer opens with the apk. The one you have to upload is the one that contains Build

  

Things to keep in mind about the keystore

     
  • With a single keystore, you can sign several apps.

  •   
  • It is very important to save it permanently, in USB, in the cloud, in the safe etc ...

  •   
  • In future updates of your APP, to re-sign, you need it.
  •   

Official Documentation App signing

    
answered by 11.09.2016 в 17:17