The xml files not recognized by android studio
up vote
1
down vote
favorite
Here is my simple xml and android studio not recognize it and gave no suggestion when I try to write new line. It repeat in any new xml file in this project, but there is no such kind of errors in other my projects
Here is code.... Nothing so special, but if you will check the image, you will see that for example match parent in width property doesnt recogized at all, but put the text in proper way...
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
tools:context=".NewActivity">
<TextView
android:id="@+id/textView"
android:text="Item Detail Here..."
android:textSize="30sp"
android:textColor="#000"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android android-studio
add a comment |
up vote
1
down vote
favorite
Here is my simple xml and android studio not recognize it and gave no suggestion when I try to write new line. It repeat in any new xml file in this project, but there is no such kind of errors in other my projects
Here is code.... Nothing so special, but if you will check the image, you will see that for example match parent in width property doesnt recogized at all, but put the text in proper way...
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
tools:context=".NewActivity">
<TextView
android:id="@+id/textView"
android:text="Item Detail Here..."
android:textSize="30sp"
android:textColor="#000"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android android-studio
plz post completed xml file in text format
– navylover
Nov 11 at 7:29
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Here is my simple xml and android studio not recognize it and gave no suggestion when I try to write new line. It repeat in any new xml file in this project, but there is no such kind of errors in other my projects
Here is code.... Nothing so special, but if you will check the image, you will see that for example match parent in width property doesnt recogized at all, but put the text in proper way...
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
tools:context=".NewActivity">
<TextView
android:id="@+id/textView"
android:text="Item Detail Here..."
android:textSize="30sp"
android:textColor="#000"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android android-studio
Here is my simple xml and android studio not recognize it and gave no suggestion when I try to write new line. It repeat in any new xml file in this project, but there is no such kind of errors in other my projects
Here is code.... Nothing so special, but if you will check the image, you will see that for example match parent in width property doesnt recogized at all, but put the text in proper way...
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
tools:context=".NewActivity">
<TextView
android:id="@+id/textView"
android:text="Item Detail Here..."
android:textSize="30sp"
android:textColor="#000"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android android-studio
android android-studio
edited Nov 11 at 7:36
p.alexey
581213
581213
asked Nov 11 at 7:23
Underseamouse
64
64
plz post completed xml file in text format
– navylover
Nov 11 at 7:29
add a comment |
plz post completed xml file in text format
– navylover
Nov 11 at 7:29
plz post completed xml file in text format
– navylover
Nov 11 at 7:29
plz post completed xml file in text format
– navylover
Nov 11 at 7:29
add a comment |
3 Answers
3
active
oldest
votes
up vote
0
down vote
Firstly check your layout xml file if there are errors.
Then try delete .idea folder of this project, reopen android studio and click Build--Rebuild project
menu.
already tried... doesnt work. Also tried to Invalidate cache. Nothing
– Underseamouse
Nov 11 at 8:00
add a comment |
up vote
0
down vote
First Check if Your Gradle sync...
After That Be sure if You do not have any error in import R or other packages
after That go to File>Invalidate Caches/Restart
and Build>Clean & Rebuild
It is ok for me :)
Already tried everything except R package... How to check it?
– Underseamouse
Nov 11 at 8:15
You should Import it in activity for this layout ... Your package name.R like it ... Remove it after that click On R and Insert Alt+Enter and choose Import
– user7268353
Nov 11 at 17:17
add a comment |
up vote
0
down vote
If we could see the whole xml file it will be more helpful, but here are things to try out.
if there is more than one view inside that LinearLayout, then set an orientation for the LinearLayout, like so:
android:orientation="vertical"
orandroid:orientation="horizontal"
for vertical or horizontal orientation.try invalidating the caches and rebuilding the project, File>Invalidate Caches/Restart, then Build> Clean & Rebuild
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Firstly check your layout xml file if there are errors.
Then try delete .idea folder of this project, reopen android studio and click Build--Rebuild project
menu.
already tried... doesnt work. Also tried to Invalidate cache. Nothing
– Underseamouse
Nov 11 at 8:00
add a comment |
up vote
0
down vote
Firstly check your layout xml file if there are errors.
Then try delete .idea folder of this project, reopen android studio and click Build--Rebuild project
menu.
already tried... doesnt work. Also tried to Invalidate cache. Nothing
– Underseamouse
Nov 11 at 8:00
add a comment |
up vote
0
down vote
up vote
0
down vote
Firstly check your layout xml file if there are errors.
Then try delete .idea folder of this project, reopen android studio and click Build--Rebuild project
menu.
Firstly check your layout xml file if there are errors.
Then try delete .idea folder of this project, reopen android studio and click Build--Rebuild project
menu.
answered Nov 11 at 7:42
navylover
2,89621117
2,89621117
already tried... doesnt work. Also tried to Invalidate cache. Nothing
– Underseamouse
Nov 11 at 8:00
add a comment |
already tried... doesnt work. Also tried to Invalidate cache. Nothing
– Underseamouse
Nov 11 at 8:00
already tried... doesnt work. Also tried to Invalidate cache. Nothing
– Underseamouse
Nov 11 at 8:00
already tried... doesnt work. Also tried to Invalidate cache. Nothing
– Underseamouse
Nov 11 at 8:00
add a comment |
up vote
0
down vote
First Check if Your Gradle sync...
After That Be sure if You do not have any error in import R or other packages
after That go to File>Invalidate Caches/Restart
and Build>Clean & Rebuild
It is ok for me :)
Already tried everything except R package... How to check it?
– Underseamouse
Nov 11 at 8:15
You should Import it in activity for this layout ... Your package name.R like it ... Remove it after that click On R and Insert Alt+Enter and choose Import
– user7268353
Nov 11 at 17:17
add a comment |
up vote
0
down vote
First Check if Your Gradle sync...
After That Be sure if You do not have any error in import R or other packages
after That go to File>Invalidate Caches/Restart
and Build>Clean & Rebuild
It is ok for me :)
Already tried everything except R package... How to check it?
– Underseamouse
Nov 11 at 8:15
You should Import it in activity for this layout ... Your package name.R like it ... Remove it after that click On R and Insert Alt+Enter and choose Import
– user7268353
Nov 11 at 17:17
add a comment |
up vote
0
down vote
up vote
0
down vote
First Check if Your Gradle sync...
After That Be sure if You do not have any error in import R or other packages
after That go to File>Invalidate Caches/Restart
and Build>Clean & Rebuild
It is ok for me :)
First Check if Your Gradle sync...
After That Be sure if You do not have any error in import R or other packages
after That go to File>Invalidate Caches/Restart
and Build>Clean & Rebuild
It is ok for me :)
answered Nov 11 at 7:58
user7268353
Already tried everything except R package... How to check it?
– Underseamouse
Nov 11 at 8:15
You should Import it in activity for this layout ... Your package name.R like it ... Remove it after that click On R and Insert Alt+Enter and choose Import
– user7268353
Nov 11 at 17:17
add a comment |
Already tried everything except R package... How to check it?
– Underseamouse
Nov 11 at 8:15
You should Import it in activity for this layout ... Your package name.R like it ... Remove it after that click On R and Insert Alt+Enter and choose Import
– user7268353
Nov 11 at 17:17
Already tried everything except R package... How to check it?
– Underseamouse
Nov 11 at 8:15
Already tried everything except R package... How to check it?
– Underseamouse
Nov 11 at 8:15
You should Import it in activity for this layout ... Your package name.R like it ... Remove it after that click On R and Insert Alt+Enter and choose Import
– user7268353
Nov 11 at 17:17
You should Import it in activity for this layout ... Your package name.R like it ... Remove it after that click On R and Insert Alt+Enter and choose Import
– user7268353
Nov 11 at 17:17
add a comment |
up vote
0
down vote
If we could see the whole xml file it will be more helpful, but here are things to try out.
if there is more than one view inside that LinearLayout, then set an orientation for the LinearLayout, like so:
android:orientation="vertical"
orandroid:orientation="horizontal"
for vertical or horizontal orientation.try invalidating the caches and rebuilding the project, File>Invalidate Caches/Restart, then Build> Clean & Rebuild
add a comment |
up vote
0
down vote
If we could see the whole xml file it will be more helpful, but here are things to try out.
if there is more than one view inside that LinearLayout, then set an orientation for the LinearLayout, like so:
android:orientation="vertical"
orandroid:orientation="horizontal"
for vertical or horizontal orientation.try invalidating the caches and rebuilding the project, File>Invalidate Caches/Restart, then Build> Clean & Rebuild
add a comment |
up vote
0
down vote
up vote
0
down vote
If we could see the whole xml file it will be more helpful, but here are things to try out.
if there is more than one view inside that LinearLayout, then set an orientation for the LinearLayout, like so:
android:orientation="vertical"
orandroid:orientation="horizontal"
for vertical or horizontal orientation.try invalidating the caches and rebuilding the project, File>Invalidate Caches/Restart, then Build> Clean & Rebuild
If we could see the whole xml file it will be more helpful, but here are things to try out.
if there is more than one view inside that LinearLayout, then set an orientation for the LinearLayout, like so:
android:orientation="vertical"
orandroid:orientation="horizontal"
for vertical or horizontal orientation.try invalidating the caches and rebuilding the project, File>Invalidate Caches/Restart, then Build> Clean & Rebuild
answered Nov 11 at 8:22
Ebi Igweze
22927
22927
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53246671%2fthe-xml-files-not-recognized-by-android-studio%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
plz post completed xml file in text format
– navylover
Nov 11 at 7:29