Android Studio Error “Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8”

Make sure that your Gradle is using the proper JDK. Try running ./gradlew –version in your project’s directory. The output should be something like this: Gradle 7.0-rc-2 ———————————————————— Build time: 2021-04-01 21:26:39 UTC Revision: 912a3368b654b71250dfc925a20d620393 Kotlin: 1.4.31 Groovy: 3.0.7 Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020 JVM: 11.0.10 (Ubuntu 11.0.10+9-Ubuntu-0ubuntu1.20.10) OS: Linux … Read more

How can I create a keystore?

To answer the question in the title, you create a keystore with the Java Keytool utility that comes with any standard JDK distribution and can be located at %JAVA_HOME%\bin. On Windows this would usually be C:\Program Files\Java\jre7\bin. On Windows, open a command window and switch to that directory. On Linux type OS do the same … Read more

How to make an ImageView with rounded corners?

This is pretty late in response, but for anyone else that is looking for this, you can do the following code to manually round the corners of your images. http://www.ruibm.com/?p=184 This isn’t my code, but I’ve used it and it’s works wonderfully. I used it as a helper within an ImageHelper class and extended it … Read more

Sending Email in Android using JavaMail API without using the default/built-in app

Send e-mail in Android using the JavaMail API using Gmail authentication. Steps to create a sample Project: MailSenderActivity.java: public class MailSenderActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final Button send = (Button) this.findViewById(R.id.send); send.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { try { GMailSender sender = new GMailSender(“username@gmail.com”, “password”); sender.sendMail(“This … Read more

Get the current language in device

I’ve checked the Locale methods on my Android 4.1.2 device, and the results: Locale.getDefault().getLanguage() —> en Locale.getDefault().getISO3Language() —> eng Locale.getDefault().getCountry() —> US Locale.getDefault().getISO3Country() —> USA Locale.getDefault().getDisplayCountry() —> United States Locale.getDefault().getDisplayName() —> English (United States) Locale.getDefault().toString() —> en_US Locale.getDefault().getDisplayLanguage()—> English Locale.getDefault().toLanguageTag() —> en-US

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