I have this error when working in Android Studio. Please help me. I am new to android studio.
Asked
Active
Viewed 63 times
-1

Ana
- 166
- 1
- 16

Kamalanayanan
- 3
- 1
-
kindly consider adding more information in your answer – Inder Aug 24 '18 at 10:46
-
1Perhaps the `res/values/dimens.xml` file is missing in your project or doesn't include the expected identifiers(?) – Markus Kauppinen Aug 24 '18 at 10:53
-
As a quick solution remove all those lines . And read about [Android Resource structure](https://developer.android.com/guide/topics/resources/providing-resources) . – ADM Aug 24 '18 at 11:11
-
Maybe this can help you. https://stackoverflow.com/questions/48549587/failed-linking-file-resource-i-am-getting-this-error-even-after-trying-all-po?rq=1 – Daniel F Aug 24 '18 at 11:43
2 Answers
0
I suppose you copied all these lines from another project that you found online.
In the project where these lines originally come from there is a file dimens.xml
in res
folder which contains all these @dimen/...
values. These are numeric values and they are used to set the padding of your Layout
You must copy this file in your project too or just delete the first 4 red underlined lines.
As for the 5th line you may leave it like this:
tools.context=".MainActivity"
0
1) create dimens file It's located in res/values/dimens , here's what a sample of the file look like:
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>
2) Make activity context like this:
tools:context=".MainActivity"

5ec20ab0
- 742
- 6
- 15