Default activity not found, even though it is declared in Manifest












0















I have not found the solution to this online. All of my activities are declared, however often Android Studio will tell me it does not find them. It doesn't always occur, and it seems to happen quite randomly. I've cleaned, invalidated and restarted, rebuild, sometimes this will get fixed then start happening again after some time. I'm working in a team on the project, and I seem to be the only one with the bug:



<?xml version="1.0" encoding="utf-8"?>
<manifest package="fall2018.csc2017.GameCentre"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
<activity android:name=".LoginActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SlidingTiles.SlidingGameActivity" />
<activity android:name=".Score.MenuScoreboardsActivity" />
<activity android:name=".Score.UserScoreboardActivity" />
<activity android:name=".Score.ScoreScreenActivity" />
<activity android:name=".Score.GameScoreboardActivity" />
<activity android:name=".GameLauncherActivity" />
<activity android:name=".RegisterActivity" />
<activity android:name=".SlidingTiles.SlidingTilesStartingActivity" />
<activity android:name=".Simon.SimonGameActivity" />
<activity android:name=".Simon.SimonStartingActivity" />
<activity android:name=".ChooseDimensionActivity"></activity>
</application>




This is my gradle



apply plugin: 'com.android.application'

android {
compileSdkVersion 27
defaultConfig {
applicationId "fall2018.csc2017.GameCentre"
minSdkVersion 27
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
testOptions {
unitTests.returnDefaultValues = true
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}









share|improve this question

























  • Select run configuration as app from the drop-down list left to the run button in Android Studio

    – Shashanth
    Nov 27 '18 at 14:21











  • Installation Options: Deploy is "Default APK", Launch options has Launch: "Default Activity"

    – Nicolae Stroncea
    Nov 27 '18 at 14:26











  • if possible in your free time try re-installing android studio

    – nimi0112
    Nov 27 '18 at 14:31













  • Do not edit configurations let it as is. Check this screenshot

    – Shashanth
    Nov 27 '18 at 14:31











  • The configurations were left by default

    – Nicolae Stroncea
    Nov 27 '18 at 21:10
















0















I have not found the solution to this online. All of my activities are declared, however often Android Studio will tell me it does not find them. It doesn't always occur, and it seems to happen quite randomly. I've cleaned, invalidated and restarted, rebuild, sometimes this will get fixed then start happening again after some time. I'm working in a team on the project, and I seem to be the only one with the bug:



<?xml version="1.0" encoding="utf-8"?>
<manifest package="fall2018.csc2017.GameCentre"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
<activity android:name=".LoginActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SlidingTiles.SlidingGameActivity" />
<activity android:name=".Score.MenuScoreboardsActivity" />
<activity android:name=".Score.UserScoreboardActivity" />
<activity android:name=".Score.ScoreScreenActivity" />
<activity android:name=".Score.GameScoreboardActivity" />
<activity android:name=".GameLauncherActivity" />
<activity android:name=".RegisterActivity" />
<activity android:name=".SlidingTiles.SlidingTilesStartingActivity" />
<activity android:name=".Simon.SimonGameActivity" />
<activity android:name=".Simon.SimonStartingActivity" />
<activity android:name=".ChooseDimensionActivity"></activity>
</application>




This is my gradle



apply plugin: 'com.android.application'

android {
compileSdkVersion 27
defaultConfig {
applicationId "fall2018.csc2017.GameCentre"
minSdkVersion 27
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
testOptions {
unitTests.returnDefaultValues = true
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}









share|improve this question

























  • Select run configuration as app from the drop-down list left to the run button in Android Studio

    – Shashanth
    Nov 27 '18 at 14:21











  • Installation Options: Deploy is "Default APK", Launch options has Launch: "Default Activity"

    – Nicolae Stroncea
    Nov 27 '18 at 14:26











  • if possible in your free time try re-installing android studio

    – nimi0112
    Nov 27 '18 at 14:31













  • Do not edit configurations let it as is. Check this screenshot

    – Shashanth
    Nov 27 '18 at 14:31











  • The configurations were left by default

    – Nicolae Stroncea
    Nov 27 '18 at 21:10














0












0








0








I have not found the solution to this online. All of my activities are declared, however often Android Studio will tell me it does not find them. It doesn't always occur, and it seems to happen quite randomly. I've cleaned, invalidated and restarted, rebuild, sometimes this will get fixed then start happening again after some time. I'm working in a team on the project, and I seem to be the only one with the bug:



<?xml version="1.0" encoding="utf-8"?>
<manifest package="fall2018.csc2017.GameCentre"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
<activity android:name=".LoginActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SlidingTiles.SlidingGameActivity" />
<activity android:name=".Score.MenuScoreboardsActivity" />
<activity android:name=".Score.UserScoreboardActivity" />
<activity android:name=".Score.ScoreScreenActivity" />
<activity android:name=".Score.GameScoreboardActivity" />
<activity android:name=".GameLauncherActivity" />
<activity android:name=".RegisterActivity" />
<activity android:name=".SlidingTiles.SlidingTilesStartingActivity" />
<activity android:name=".Simon.SimonGameActivity" />
<activity android:name=".Simon.SimonStartingActivity" />
<activity android:name=".ChooseDimensionActivity"></activity>
</application>




This is my gradle



apply plugin: 'com.android.application'

android {
compileSdkVersion 27
defaultConfig {
applicationId "fall2018.csc2017.GameCentre"
minSdkVersion 27
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
testOptions {
unitTests.returnDefaultValues = true
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}









share|improve this question
















I have not found the solution to this online. All of my activities are declared, however often Android Studio will tell me it does not find them. It doesn't always occur, and it seems to happen quite randomly. I've cleaned, invalidated and restarted, rebuild, sometimes this will get fixed then start happening again after some time. I'm working in a team on the project, and I seem to be the only one with the bug:



<?xml version="1.0" encoding="utf-8"?>
<manifest package="fall2018.csc2017.GameCentre"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
<activity android:name=".LoginActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SlidingTiles.SlidingGameActivity" />
<activity android:name=".Score.MenuScoreboardsActivity" />
<activity android:name=".Score.UserScoreboardActivity" />
<activity android:name=".Score.ScoreScreenActivity" />
<activity android:name=".Score.GameScoreboardActivity" />
<activity android:name=".GameLauncherActivity" />
<activity android:name=".RegisterActivity" />
<activity android:name=".SlidingTiles.SlidingTilesStartingActivity" />
<activity android:name=".Simon.SimonGameActivity" />
<activity android:name=".Simon.SimonStartingActivity" />
<activity android:name=".ChooseDimensionActivity"></activity>
</application>




This is my gradle



apply plugin: 'com.android.application'

android {
compileSdkVersion 27
defaultConfig {
applicationId "fall2018.csc2017.GameCentre"
minSdkVersion 27
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
testOptions {
unitTests.returnDefaultValues = true
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}






android android-studio gradle android-gradle android-manifest






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 27 '18 at 14:24







Nicolae Stroncea

















asked Nov 27 '18 at 14:06









Nicolae StronceaNicolae Stroncea

133112




133112













  • Select run configuration as app from the drop-down list left to the run button in Android Studio

    – Shashanth
    Nov 27 '18 at 14:21











  • Installation Options: Deploy is "Default APK", Launch options has Launch: "Default Activity"

    – Nicolae Stroncea
    Nov 27 '18 at 14:26











  • if possible in your free time try re-installing android studio

    – nimi0112
    Nov 27 '18 at 14:31













  • Do not edit configurations let it as is. Check this screenshot

    – Shashanth
    Nov 27 '18 at 14:31











  • The configurations were left by default

    – Nicolae Stroncea
    Nov 27 '18 at 21:10



















  • Select run configuration as app from the drop-down list left to the run button in Android Studio

    – Shashanth
    Nov 27 '18 at 14:21











  • Installation Options: Deploy is "Default APK", Launch options has Launch: "Default Activity"

    – Nicolae Stroncea
    Nov 27 '18 at 14:26











  • if possible in your free time try re-installing android studio

    – nimi0112
    Nov 27 '18 at 14:31













  • Do not edit configurations let it as is. Check this screenshot

    – Shashanth
    Nov 27 '18 at 14:31











  • The configurations were left by default

    – Nicolae Stroncea
    Nov 27 '18 at 21:10

















Select run configuration as app from the drop-down list left to the run button in Android Studio

– Shashanth
Nov 27 '18 at 14:21





Select run configuration as app from the drop-down list left to the run button in Android Studio

– Shashanth
Nov 27 '18 at 14:21













Installation Options: Deploy is "Default APK", Launch options has Launch: "Default Activity"

– Nicolae Stroncea
Nov 27 '18 at 14:26





Installation Options: Deploy is "Default APK", Launch options has Launch: "Default Activity"

– Nicolae Stroncea
Nov 27 '18 at 14:26













if possible in your free time try re-installing android studio

– nimi0112
Nov 27 '18 at 14:31







if possible in your free time try re-installing android studio

– nimi0112
Nov 27 '18 at 14:31















Do not edit configurations let it as is. Check this screenshot

– Shashanth
Nov 27 '18 at 14:31





Do not edit configurations let it as is. Check this screenshot

– Shashanth
Nov 27 '18 at 14:31













The configurations were left by default

– Nicolae Stroncea
Nov 27 '18 at 21:10





The configurations were left by default

– Nicolae Stroncea
Nov 27 '18 at 21:10












1 Answer
1






active

oldest

votes


















0














It is hard to tell what is the exact issue based on the only information you provided. But, few things you can try to find the issue:




  • Try running your app on a different physical device or emulator. If
    it fixes it, that means that was a device issue.


  • Set breakpoints on all of your onCreate methods activities, as well as the previous code snippet where the activity will be launching the following activity, for example:




    Intent intent = new Intent(context, className);

    intent.setFlags(intFlag);

    context.startActivity(intent);





And try to debug to see if the activity is being created or being launched. This could be a good start to narrow down the problem. Good luck!



FYI, switch this line :
<activity android:name=".ChooseDimensionActivity"></activity>

to this:



<activity android:name=".ChooseDimensionActivity"/>





share|improve this answer























    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%2f53501515%2fdefault-activity-not-found-even-though-it-is-declared-in-manifest%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    It is hard to tell what is the exact issue based on the only information you provided. But, few things you can try to find the issue:




    • Try running your app on a different physical device or emulator. If
      it fixes it, that means that was a device issue.


    • Set breakpoints on all of your onCreate methods activities, as well as the previous code snippet where the activity will be launching the following activity, for example:




      Intent intent = new Intent(context, className);

      intent.setFlags(intFlag);

      context.startActivity(intent);





    And try to debug to see if the activity is being created or being launched. This could be a good start to narrow down the problem. Good luck!



    FYI, switch this line :
    <activity android:name=".ChooseDimensionActivity"></activity>

    to this:



    <activity android:name=".ChooseDimensionActivity"/>





    share|improve this answer




























      0














      It is hard to tell what is the exact issue based on the only information you provided. But, few things you can try to find the issue:




      • Try running your app on a different physical device or emulator. If
        it fixes it, that means that was a device issue.


      • Set breakpoints on all of your onCreate methods activities, as well as the previous code snippet where the activity will be launching the following activity, for example:




        Intent intent = new Intent(context, className);

        intent.setFlags(intFlag);

        context.startActivity(intent);





      And try to debug to see if the activity is being created or being launched. This could be a good start to narrow down the problem. Good luck!



      FYI, switch this line :
      <activity android:name=".ChooseDimensionActivity"></activity>

      to this:



      <activity android:name=".ChooseDimensionActivity"/>





      share|improve this answer


























        0












        0








        0







        It is hard to tell what is the exact issue based on the only information you provided. But, few things you can try to find the issue:




        • Try running your app on a different physical device or emulator. If
          it fixes it, that means that was a device issue.


        • Set breakpoints on all of your onCreate methods activities, as well as the previous code snippet where the activity will be launching the following activity, for example:




          Intent intent = new Intent(context, className);

          intent.setFlags(intFlag);

          context.startActivity(intent);





        And try to debug to see if the activity is being created or being launched. This could be a good start to narrow down the problem. Good luck!



        FYI, switch this line :
        <activity android:name=".ChooseDimensionActivity"></activity>

        to this:



        <activity android:name=".ChooseDimensionActivity"/>





        share|improve this answer













        It is hard to tell what is the exact issue based on the only information you provided. But, few things you can try to find the issue:




        • Try running your app on a different physical device or emulator. If
          it fixes it, that means that was a device issue.


        • Set breakpoints on all of your onCreate methods activities, as well as the previous code snippet where the activity will be launching the following activity, for example:




          Intent intent = new Intent(context, className);

          intent.setFlags(intFlag);

          context.startActivity(intent);





        And try to debug to see if the activity is being created or being launched. This could be a good start to narrow down the problem. Good luck!



        FYI, switch this line :
        <activity android:name=".ChooseDimensionActivity"></activity>

        to this:



        <activity android:name=".ChooseDimensionActivity"/>






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 27 '18 at 14:28









        Red MRed M

        99131127




        99131127
































            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%2f53501515%2fdefault-activity-not-found-even-though-it-is-declared-in-manifest%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

            Contact image not getting when fetch all contact list from iPhone by CNContact

            count number of partitions of a set with n elements into k subsets

            A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks