Build Error: Jack requires Build Tools 24.0.0 or later
<p>I am using RX library in my android project and due to some reasons I need to have my <strong>build.gradle</strong> as:</p>

<pre><code>apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
    applicationId "com.urjapawar.bevyotp"
    minSdkVersion 18
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    jackOptions {
        enabled true
    }
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'io.reactivex:rxandroid:0.24.0'
}
</code></pre>

<p>I have visited <a href="https://stackoverflow.com/questions/36237132/execution-failed-for-task-appprocessdebugresources-even-with-latest-build-to">this</a> and <a href="https://stackoverflow.com/questions/37024263/getting-error-in-android-studio-2-1-with-java-8">this too</a> but cannot fix it. My project code is
<strong>RegisterActivity.java</strong></p>

<pre><code>public class RegisterActivity extends AppCompatActivity {

EditText name,email,phonenumber,city;
Button button;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_register);
    name = (EditText) findViewById(R.id.nameinput);
    email = (EditText) findViewById(R.id.emailinput);
    phonenumber = (EditText) findViewById(R.id.phonenumber);
    city = (EditText) findViewById(R.id.cityName);
    final Pattern emailPattern = Pattern.compile(
            "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@"
                    + "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$");

    Observable&lt;Boolean&gt; userNameValid = WidgetObservable.text(name) //  [2]
            .map(e -&gt; e.text())
            .map(t -&gt; t.length() != 0);

    Observable&lt;Boolean&gt; emailValid = WidgetObservable.text(email)
            .map(e -&gt; e.text())
            .map(t -&gt; emailPattern.matcher(t).matches());

    Button registerButton = (Button) findViewById(R.id.button3);

    Observable&lt;Boolean&gt; registerEnabled =
            Observable.combineLatest(userNameValid, emailValid, (a, b) -&gt; a &amp;&amp; b);
    // registerEnabled.subscribe(enabled -&gt; registerButton.setEnabled(enabled));
    emailValid.distinctUntilChanged()
            .doOnNext(b -&gt; Log.d("[Rx]", "Email " + (b ? "Valid" : "Invalid")))
            .map(b -&gt; b ? Color.BLACK : Color.RED)
            .subscribe(color -&gt; email.setTextColor(color));

    userNameValid.distinctUntilChanged()
            .doOnNext(b -&gt; Log.d("[Rx]", "Uname " + (b ? "Valid" : "Invalid")))
            .map(b -&gt; b ? Color.BLACK : Color.RED)
            .subscribe(color -&gt; name.setTextColor(color));

 // and registerEnabled

    registerEnabled.distinctUntilChanged()
            .doOnNext(b -&gt; Log.d("[Rx]", "Button " + (b ? "Enabled" : "Disabled")))
            .subscribe(enabled -&gt; registerButton.setEnabled(enabled));

}
public void OTPbutton(View view){
    startActivity(new Intent(RegisterActivity.this, ChooseActivity.class));
}


}
</code></pre>

<p>Here is the log
<a href="https://i.stack.imgur.com/afHGw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/afHGw.png" alt="Log"></a></p>

<p>Thanks in advance</p>