I have the following bool.xml
file:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="some_key">false</bool>
</resources>
When I try to use this value in AndroidManifest
:
<activity
android:name=".ui.activities.SomeActivity"
android:enabled="@bool/some_key"
... >
...
</activity>
I get this error:
Cannot convert string '@bool/some_key' to target class 'boolean'
I'm using Android Studio 2.2.3
The code looks fine.This is the issue of Android studio 2.x .It is fixed in 2.3 .Please refer here.If you still need to get this done use 2.3 canary instead get 2.3 canary
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With