Question: Refer to the second point here(Encrypt Class Files) How to make apk Secure. Protecting from Decompile how can i encrypt and decrypt class file in Android?

Answer: 
You can obfuscate code with [proguard](https://developer.android.com/studio/build/shrink-code.html) (free) and [dexgaurd](https://www.guardsquare.com/en/dexguard) (enterprise)

in your app gradle:

```
buildTypes {
    release {
        minifyEnabled true
        shrinkResources true

        proguardFile 'proguard-google-play-services.pro'
        proguardFile 'proguard-butter-knife.pro'
        proguardFile 'proguard-volley.pro'

    }
    debug {
        minifyEnabled false
    }
}

```

with this code in release mode your code obfuscate.

some files must not obfuscate so you can create some files in root of app folders and on that you can set which file must not obfuscate

volley files for example:

```
-keep class com.android.volley.** {*;}
-keep class com.android.volley.toolbox.** {*;}
-keep class com.android.volley.Response$* { *; }
-keep class com.android.volley.Request$* { *; }
-keep class com.android.volley.RequestQueue$* { *; }
-keep class com.android.volley.toolbox.HurlStack$* { *; }
-keep class com.android.volley.toolbox.ImageLoader$* { *; }

```

usually in libraries readme they write what you have to write for prevent obfuscating for some classes.
also consider you can only make it harder but not impossible.
You can try this tool if you want a higher level for obfuscation: 
[Bg+ Anti Decompiler/Obfuscator](https://play.google.com/store/apps/details?id=com.bgplus.Anti.JavaDecompiler)