Android Studio - Lots of errors after reopening project The 2019 Stack Overflow Developer Survey Results Are InWhy is Android Studio reporting “URI is not registered”?R cannot be resolved - Android error'Must Override a Superclass Method' Errors after importing a project into Eclipse“Debug certificate expired” error in Eclipse Android pluginsHow to call a method after a delay in AndroidAndroid error: Failed to install *.apk on device *: timeoutAndroid - Google Maps API v2 - NoClassDefFoundErrorHow do I add a library project to Android Studio?Android Studio: Add jar as library?“cannot resolve symbol R” in Android StudioCan't Find Theme.AppCompat.Light for New Android ActionBar Support

aging parents with no investments

Falsification in Math vs Science

What does "rabbited" mean/imply in this sentence?

Protecting Dualbooting Windows from dangerous code (like rm -rf)

Lethal sonic weapons

Pristine Bit Checking

What is this 4-propeller plane?

Time travel alters history but people keep saying nothing's changed

Why is it "Tumoren" and not "Tumore"?

Could JWST stay at L2 "forever"?

Does light intensity oscillate really fast since it is a wave?

Is three citations per paragraph excessive for undergraduate research paper?

What does Linus Torvalds mean when he says that Git "never ever" tracks a file?

How long do I have to send my income tax payment to the IRS?

Why do UK politicians seemingly ignore opinion polls on Brexit?

If the Wish spell is used to duplicate the effect of Simulacrum, are existing duplicates destroyed?

How can I fix this gap between bookcases I made?

How is radar separation assured between primary and secondary targets?

Adding labels to a table: columns and rows

Why do some words that are not inflected have an umlaut?

Return to UK after being refused

Can the Protection from Evil and Good spell be used on the caster?

What could be the right powersource for 15 seconds lifespan disposable giant chainsaw?

Where does the "burst of radiance" from Holy Weapon originate?



Android Studio - Lots of errors after reopening project



The 2019 Stack Overflow Developer Survey Results Are InWhy is Android Studio reporting “URI is not registered”?R cannot be resolved - Android error'Must Override a Superclass Method' Errors after importing a project into Eclipse“Debug certificate expired” error in Eclipse Android pluginsHow to call a method after a delay in AndroidAndroid error: Failed to install *.apk on device *: timeoutAndroid - Google Maps API v2 - NoClassDefFoundErrorHow do I add a library project to Android Studio?Android Studio: Add jar as library?“cannot resolve symbol R” in Android StudioCan't Find Theme.AppCompat.Light for New Android ActionBar Support



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








-1















I've been working on an app that I published to the play store yesterday, but when I reopened it this morning to make some changes, there's lots of errors in the AndroidManifest.xml, activity_main.xml & styles.xml files.



Edit: Here's the files & errors



activity_main.xml



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
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"
tools:context=".MainActivity">

<WebView
android:id="@+id/the_wv"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>


Errors:



  • Lines 2, 3 & 4: URI is not registered


  • Lines 5, 6 & 7: attribute:xxxx is not allowed here


  • Line 9: Element WebView is not allowed here


styles.xml



<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:statusBarColor">@color/mainColor</item>
</style>

</resources>


Errors:



  • Lines 6-9: Cannot resolve symbol 'xxxxxx'

AndroidManifest.xml



<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.appname">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:screenOrientation="portrait"
android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>


Errors:



  • Line 2: URI is not registered


  • Lines 6, 7, 9, 10, 11 & 13: Attribute xxxxxx is not allowed here


  • Line 14: Unresolved class 'MainActivity'


Any ideas why it might be throwing all these errors all of a sudden?










share|improve this question



















  • 2





    Please share the errors as well.

    – Parth Lotia
    Mar 8 at 8:59











  • Try clean, rebuild, + sync project gradle files. Also, you can try restarting Studio by : File >> Invalidate cache and restart

    – Ana
    Mar 8 at 9:18











  • I've edited my question with my code & errors. I tried to clean & rebuild but that doesn't seem to have fixed any of the errors

    – Nexus6
    Mar 8 at 9:44

















-1















I've been working on an app that I published to the play store yesterday, but when I reopened it this morning to make some changes, there's lots of errors in the AndroidManifest.xml, activity_main.xml & styles.xml files.



Edit: Here's the files & errors



activity_main.xml



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
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"
tools:context=".MainActivity">

<WebView
android:id="@+id/the_wv"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>


Errors:



  • Lines 2, 3 & 4: URI is not registered


  • Lines 5, 6 & 7: attribute:xxxx is not allowed here


  • Line 9: Element WebView is not allowed here


styles.xml



<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:statusBarColor">@color/mainColor</item>
</style>

</resources>


Errors:



  • Lines 6-9: Cannot resolve symbol 'xxxxxx'

AndroidManifest.xml



<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.appname">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:screenOrientation="portrait"
android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>


Errors:



  • Line 2: URI is not registered


  • Lines 6, 7, 9, 10, 11 & 13: Attribute xxxxxx is not allowed here


  • Line 14: Unresolved class 'MainActivity'


Any ideas why it might be throwing all these errors all of a sudden?










share|improve this question



















  • 2





    Please share the errors as well.

    – Parth Lotia
    Mar 8 at 8:59











  • Try clean, rebuild, + sync project gradle files. Also, you can try restarting Studio by : File >> Invalidate cache and restart

    – Ana
    Mar 8 at 9:18











  • I've edited my question with my code & errors. I tried to clean & rebuild but that doesn't seem to have fixed any of the errors

    – Nexus6
    Mar 8 at 9:44













-1












-1








-1








I've been working on an app that I published to the play store yesterday, but when I reopened it this morning to make some changes, there's lots of errors in the AndroidManifest.xml, activity_main.xml & styles.xml files.



Edit: Here's the files & errors



activity_main.xml



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
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"
tools:context=".MainActivity">

<WebView
android:id="@+id/the_wv"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>


Errors:



  • Lines 2, 3 & 4: URI is not registered


  • Lines 5, 6 & 7: attribute:xxxx is not allowed here


  • Line 9: Element WebView is not allowed here


styles.xml



<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:statusBarColor">@color/mainColor</item>
</style>

</resources>


Errors:



  • Lines 6-9: Cannot resolve symbol 'xxxxxx'

AndroidManifest.xml



<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.appname">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:screenOrientation="portrait"
android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>


Errors:



  • Line 2: URI is not registered


  • Lines 6, 7, 9, 10, 11 & 13: Attribute xxxxxx is not allowed here


  • Line 14: Unresolved class 'MainActivity'


Any ideas why it might be throwing all these errors all of a sudden?










share|improve this question
















I've been working on an app that I published to the play store yesterday, but when I reopened it this morning to make some changes, there's lots of errors in the AndroidManifest.xml, activity_main.xml & styles.xml files.



Edit: Here's the files & errors



activity_main.xml



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
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"
tools:context=".MainActivity">

<WebView
android:id="@+id/the_wv"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>


Errors:



  • Lines 2, 3 & 4: URI is not registered


  • Lines 5, 6 & 7: attribute:xxxx is not allowed here


  • Line 9: Element WebView is not allowed here


styles.xml



<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:statusBarColor">@color/mainColor</item>
</style>

</resources>


Errors:



  • Lines 6-9: Cannot resolve symbol 'xxxxxx'

AndroidManifest.xml



<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.appname">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:screenOrientation="portrait"
android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>


Errors:



  • Line 2: URI is not registered


  • Lines 6, 7, 9, 10, 11 & 13: Attribute xxxxxx is not allowed here


  • Line 14: Unresolved class 'MainActivity'


Any ideas why it might be throwing all these errors all of a sudden?







android compiler-errors






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 8 at 10:13









Zoe

13.4k85386




13.4k85386










asked Mar 8 at 8:58









Nexus6Nexus6

11




11







  • 2





    Please share the errors as well.

    – Parth Lotia
    Mar 8 at 8:59











  • Try clean, rebuild, + sync project gradle files. Also, you can try restarting Studio by : File >> Invalidate cache and restart

    – Ana
    Mar 8 at 9:18











  • I've edited my question with my code & errors. I tried to clean & rebuild but that doesn't seem to have fixed any of the errors

    – Nexus6
    Mar 8 at 9:44












  • 2





    Please share the errors as well.

    – Parth Lotia
    Mar 8 at 8:59











  • Try clean, rebuild, + sync project gradle files. Also, you can try restarting Studio by : File >> Invalidate cache and restart

    – Ana
    Mar 8 at 9:18











  • I've edited my question with my code & errors. I tried to clean & rebuild but that doesn't seem to have fixed any of the errors

    – Nexus6
    Mar 8 at 9:44







2




2





Please share the errors as well.

– Parth Lotia
Mar 8 at 8:59





Please share the errors as well.

– Parth Lotia
Mar 8 at 8:59













Try clean, rebuild, + sync project gradle files. Also, you can try restarting Studio by : File >> Invalidate cache and restart

– Ana
Mar 8 at 9:18





Try clean, rebuild, + sync project gradle files. Also, you can try restarting Studio by : File >> Invalidate cache and restart

– Ana
Mar 8 at 9:18













I've edited my question with my code & errors. I tried to clean & rebuild but that doesn't seem to have fixed any of the errors

– Nexus6
Mar 8 at 9:44





I've edited my question with my code & errors. I tried to clean & rebuild but that doesn't seem to have fixed any of the errors

– Nexus6
Mar 8 at 9:44












2 Answers
2






active

oldest

votes


















0














Clean your project and rebuild again using this steps:



Step 1: Build -> Clean Project



Step 2: Build -> Rebuild project






share|improve this answer

























  • Thanks @Hitesh but that doesn't seem to have worked

    – Nexus6
    Mar 8 at 9:44











  • can you share your project link, after uploading on drob box ? f

    – Hitesh Tarbundiya
    Mar 8 at 9:45












  • try to invalidate caches and restart

    – Hitesh Tarbundiya
    Mar 8 at 10:22


















0














You can try invalidating Android Studio cache.



File -> Invalidate Caches / Restart -> Invalidate & Restart






share|improve this answer























  • Thanks @Ali, I've just tried that but it doesn't seem to have worked

    – Nexus6
    Mar 8 at 10:28











  • Maybe [stackoverflow.com/a/25192156/9770894] can help? @Nexus6

    – Ali Korkmaz
    Mar 8 at 10:36











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55059730%2fandroid-studio-lots-of-errors-after-reopening-project%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Clean your project and rebuild again using this steps:



Step 1: Build -> Clean Project



Step 2: Build -> Rebuild project






share|improve this answer

























  • Thanks @Hitesh but that doesn't seem to have worked

    – Nexus6
    Mar 8 at 9:44











  • can you share your project link, after uploading on drob box ? f

    – Hitesh Tarbundiya
    Mar 8 at 9:45












  • try to invalidate caches and restart

    – Hitesh Tarbundiya
    Mar 8 at 10:22















0














Clean your project and rebuild again using this steps:



Step 1: Build -> Clean Project



Step 2: Build -> Rebuild project






share|improve this answer

























  • Thanks @Hitesh but that doesn't seem to have worked

    – Nexus6
    Mar 8 at 9:44











  • can you share your project link, after uploading on drob box ? f

    – Hitesh Tarbundiya
    Mar 8 at 9:45












  • try to invalidate caches and restart

    – Hitesh Tarbundiya
    Mar 8 at 10:22













0












0








0







Clean your project and rebuild again using this steps:



Step 1: Build -> Clean Project



Step 2: Build -> Rebuild project






share|improve this answer















Clean your project and rebuild again using this steps:



Step 1: Build -> Clean Project



Step 2: Build -> Rebuild project







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 8 at 9:32









John Doge

175




175










answered Mar 8 at 9:00









Hitesh TarbundiyaHitesh Tarbundiya

1598




1598












  • Thanks @Hitesh but that doesn't seem to have worked

    – Nexus6
    Mar 8 at 9:44











  • can you share your project link, after uploading on drob box ? f

    – Hitesh Tarbundiya
    Mar 8 at 9:45












  • try to invalidate caches and restart

    – Hitesh Tarbundiya
    Mar 8 at 10:22

















  • Thanks @Hitesh but that doesn't seem to have worked

    – Nexus6
    Mar 8 at 9:44











  • can you share your project link, after uploading on drob box ? f

    – Hitesh Tarbundiya
    Mar 8 at 9:45












  • try to invalidate caches and restart

    – Hitesh Tarbundiya
    Mar 8 at 10:22
















Thanks @Hitesh but that doesn't seem to have worked

– Nexus6
Mar 8 at 9:44





Thanks @Hitesh but that doesn't seem to have worked

– Nexus6
Mar 8 at 9:44













can you share your project link, after uploading on drob box ? f

– Hitesh Tarbundiya
Mar 8 at 9:45






can you share your project link, after uploading on drob box ? f

– Hitesh Tarbundiya
Mar 8 at 9:45














try to invalidate caches and restart

– Hitesh Tarbundiya
Mar 8 at 10:22





try to invalidate caches and restart

– Hitesh Tarbundiya
Mar 8 at 10:22













0














You can try invalidating Android Studio cache.



File -> Invalidate Caches / Restart -> Invalidate & Restart






share|improve this answer























  • Thanks @Ali, I've just tried that but it doesn't seem to have worked

    – Nexus6
    Mar 8 at 10:28











  • Maybe [stackoverflow.com/a/25192156/9770894] can help? @Nexus6

    – Ali Korkmaz
    Mar 8 at 10:36















0














You can try invalidating Android Studio cache.



File -> Invalidate Caches / Restart -> Invalidate & Restart






share|improve this answer























  • Thanks @Ali, I've just tried that but it doesn't seem to have worked

    – Nexus6
    Mar 8 at 10:28











  • Maybe [stackoverflow.com/a/25192156/9770894] can help? @Nexus6

    – Ali Korkmaz
    Mar 8 at 10:36













0












0








0







You can try invalidating Android Studio cache.



File -> Invalidate Caches / Restart -> Invalidate & Restart






share|improve this answer













You can try invalidating Android Studio cache.



File -> Invalidate Caches / Restart -> Invalidate & Restart







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 8 at 10:20









Ali KorkmazAli Korkmaz

11




11












  • Thanks @Ali, I've just tried that but it doesn't seem to have worked

    – Nexus6
    Mar 8 at 10:28











  • Maybe [stackoverflow.com/a/25192156/9770894] can help? @Nexus6

    – Ali Korkmaz
    Mar 8 at 10:36

















  • Thanks @Ali, I've just tried that but it doesn't seem to have worked

    – Nexus6
    Mar 8 at 10:28











  • Maybe [stackoverflow.com/a/25192156/9770894] can help? @Nexus6

    – Ali Korkmaz
    Mar 8 at 10:36
















Thanks @Ali, I've just tried that but it doesn't seem to have worked

– Nexus6
Mar 8 at 10:28





Thanks @Ali, I've just tried that but it doesn't seem to have worked

– Nexus6
Mar 8 at 10:28













Maybe [stackoverflow.com/a/25192156/9770894] can help? @Nexus6

– Ali Korkmaz
Mar 8 at 10:36





Maybe [stackoverflow.com/a/25192156/9770894] can help? @Nexus6

– Ali Korkmaz
Mar 8 at 10:36

















draft saved

draft discarded
















































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.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55059730%2fandroid-studio-lots-of-errors-after-reopening-project%23new-answer', 'question_page');

);

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







Popular posts from this blog

1928 у кіно

Захаров Федір Захарович

Ель Греко