How to clear gradle cache?

Gradle cache is located at On Windows: %USERPROFILE%\.gradle\caches On Mac / UNIX: ~/.gradle/caches/ You can browse to these directory and manually delete it or run on UNIX system. Run this command will also force to download dependencies. UPDATE Clear the Android build cache of current project NOTE: Android Studio’s File > Invalidate Caches / Restart doesn’t clear the Android build cache, so … Read more

equivalent to push() or pop() for arrays?

In Java an array has a fixed size (after initialisation), meaning that you can’t add or remove items from an array. The above snippet mean that the array of integers has a length of 10. It’s not possible add an eleventh integer, without re-assign the reference to a new array, like the following: In Java … Read more

Error checking if Bluetooth is enabled in Android (REQUEST_ENABLE_BT cannot be resolved to a variable)

REQUEST_ENABLE_BT is a request code that you provide. It’s really just a number that you provide for onActivityResult. It will be the requestCode (first parameter) of onActivityResult when the activity returns. You could put any number you want as long as it’s consistent in the return method. In other words, put a line like this in the top of your Activity: … Read more

What are the differences between LinearLayout, RelativeLayout, and AbsoluteLayout?

LinearLayout means you can align views one by one (vertically/ horizontally). RelativeLayout means based on relation of views from its parents and other views. ConstraintLayout is similar to a RelativeLayout in that it uses relations to position and size widgets, but has additional flexibility and is easier to use in the Layout Editor. WebView to load html, static or … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)