Issue
Android resource linking failed
/Users/suhaibaskar/Downloads/AndroidStudioProjects#Sqlite/app/src/main/res/layout/activity_main.xml:1: error: resource dimen/activity_vertical_margin (aka com.example.myapplication:dimen/activity_vertical_margin) not found.
/Users/suhaibaskar/Downloads/AndroidStudioProjects#Sqlite/app/src/main/res/layout/activity_main.xml:1: error: resource dimen/activity_horizontal_margin (aka com.example.myapplication:dimen/activity_horizontal_margin) not found.
/Users/suhaibaskar/Downloads/AndroidStudioProjects#Sqlite/app/src/main/res/layout/activity_main.xml:1: error: resource dimen/activity_horizontal_margin (aka com.example.myapplication:dimen/activity_horizontal_margin) not found.
/Users/suhaibaskar/Downloads/AndroidStudioProjects#Sqlite/app/src/main/res/layout/activity_main.xml:1: error: resource dimen/activity_vertical_margin (aka com.example.myapplication:dimen/activity_vertical_margin) not found.
error: failed linking file resources.
Solution
error: failed linking file resources. this error occur because of missing dimen file
first of all create dimen file in values package follow these steps to create dimen file:
Path
Right click on values > New > values resource file > set name (dimen) then press ok
add dimen in dimen file like this
<resources>
<dimen name="fab_margin">16dp</dimen>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="nav_header_vertical_spacing">8dp</dimen>
<dimen name="nav_header_height">176dp</dimen>
</resources>
I hope its work for you
Answered By - Android Geek
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.