Question: I need to implement the old style SQL outer join with condition to the new style. 

I am unable to convert the last line of the Join with condition.

Old Style Query:

```
SELECT cpd.customer_ref, cpd.product_seq, bci.contract_inst_id, 
bci.start_dat  bci_start_dat, bci.end_dat bci_end_dat 
FROM custproductdetails cpd, balcontractinstance bci
WHERE cpd.customer_ref = bci.customer_ref(+)
AND cpd.contract_seq = bci.contract_seq(+)
AND cpd.end_dat >=  bci.start_dat(+) AND cpd.end_dat <= bci.end_dat(+);

```

Answer: 
This issue is described in the [migration guide for Android Gradle Plugin 3.0.0](https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#known_issues).

> 
> ### Incorrect use of @ resource reference symbols
> 
> 
> AAPT2 now throws build errors when you omit or incorrectly place resource reference symbols (`@`). For example, consider if you omit the symbol when specifying a style attribute, as shown below:
> 
> 
> 
> ```
> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
>   ...
>   <!-- Note the missing '@' symbol when specifying the resource type. -->
>   <item name="colorPrimary">color/colorPrimary</item>
> </style>
> 
> ```
> 
> When building the module, AAPT2 now throws the following build error:
> 
> 
> 
> ```
> ERROR: expected color but got (raw string) color/colorPrimary
> 
> ```
> 
> Additionally, consider if you incorrectly include the symbol when accessing a resource from the android namespace, as shown below:
> 
> 
> 
> ```
> ...
> <!-- When referencing resources from the 'android' namespace, omit the '@' symbol. -->
> <item name="@android:windowEnterAnimation"/>
> 
> ```
> 
> When building the module, AAPT2 now throws the following build error:
> 
> 
> 
> ```
> Error: style attribute '@android:attr/windowEnterAnimation' not found
> 
> ```
> 
> 

If you didn't make the mistake described in second half, then perhaps an old version of appcompat-v7 is to blame. 

### The good

Update to newer support libraries, pick 25.4.0 or 26.1.0 or 27.0.0. Make sure you match `compileSdkVersion`.

Note: If you choose to update to something older than 27.0.0 you may run into [this issue](https://stackoverflow.com/questions/45582430).

### The bad

If for some reason you're stuck with 25.3.1 or older you can [disable AAPT2](https://developer.android.com/studio/build/gradle-plugin-3-0-0.html).

> 
> If you are experiencing issues while using AAPT2, you can disable it by setting `android.enableAapt2=false` in your `gradle.properties` file and restarting the Gradle daemon by running `./gradlew --stop` from the command line.
> 
> 
>
In my case, I removed/updated `thebuildToolsVersion "27.0.3"` in build.gradle.