Could not determine java version from '10.0.1'

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine java version from '10.0.1'.

Fix #1

Fix #2

  • Make sure you have also upgraded your build.gradle configuration
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

Fix #3

Add the following under your build.gradle file

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion 25
                buildToolsVersion '25.0.0'
            }
        }
    }
}

Voila!

 How to clear the contents of a file from the command line?

When developing, I usually have a log file for tests and development for me to keep track of what’s happening. The thing is that logs become too large. Some editors or viewers can’t open the file. They are sometimes too large to be usable.

I just delete the contents and fill it up until the next time.

Here are a few ways to delete file contents from the command line.

> filename

> log/development.log

echo

echo "test" > log/test.log

cat

cat /dev/null > log/test.log

There are probably millions of ways to do this but the above are the quickest

cp

cp /dev/null log/development.log

truncate

truncate -s 0 development.log

 MySQL: Backup Database with mysqldump from the Command Line

Backups are an essential part of development. You always want backups. mysqldump is the goto program to backup mysql databases

Backup a database

mysqldump database_name > database_dump.sql

Backup a database with username and password

mysqldump -u username -p password database_name > database_dump.sql

Backup a database with username and password and compressed

Gzip
mysqldump -u username -p password database_name | gzip > database_dump.sql.gz
Bzip
mysqldump -u username -p password database_name | bzip2 > database_dump.sql.bz2

 Nginx Essential Commands

NGINX is a free, open-source, high-performance HTTP server. NGINX usage has been growing in the past few years and you should at least learn some commands that you could use with NGINX.

First, Install NGINX

Debian/Ubuntu

apt-get install nginx

CentOS/RHEL

yum install nginx

Now, let’s get to the essential commands

Check NGINX status

$ service nginx status
$ service nginx status
nginx found running with processes:  15423 15422 15421 15420 15418 15417 15416 15414 15412

Stop NGINX

$ service nginx stop
$ service nginx stop
 * Stopping Nginx Server...                                                                                                                            [ OK ]

Start NGINX

$ service nginx start
$ service nginx start
 * Starting Nginx Server...                                                                                                                            [ OK ] 

Restart NGINX

This will do the above commands, stop and start

$ service nginx start
$ service nginx restart
 * Stopping Nginx Server...                                                                                                                            [ OK ] 
 * Starting Nginx Server...                                                                                                                            [ OK ] 

Reload NGINX Configuration

$ service nginx reload
$ service nginx reload
nginx: the configuration file /etc/conf/nginx.conf syntax is ok
nginx: configuration file /etc/conf/nginx.conf test is successful
 * Reloading (via HUP) Nginx Server...                                                                                                                        
Hangup

Come on and try these commands out on environment!