Failed to load AppCompat ActionBar with unknown error?












7















Error Snap



build.gradle file



    apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "io.dume.dume"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
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'
}


I just created a new projects and found this error dramatically on activity_main.xml i did not changed anything . Is there any Fix?










share|improve this question

























  • May be duplicate of this :stackoverflow.com/a/44858887/9050003

    – mahmoud zaher
    Nov 7 '18 at 13:41


















7















Error Snap



build.gradle file



    apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "io.dume.dume"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
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'
}


I just created a new projects and found this error dramatically on activity_main.xml i did not changed anything . Is there any Fix?










share|improve this question

























  • May be duplicate of this :stackoverflow.com/a/44858887/9050003

    – mahmoud zaher
    Nov 7 '18 at 13:41
















7












7








7


3






Error Snap



build.gradle file



    apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "io.dume.dume"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
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'
}


I just created a new projects and found this error dramatically on activity_main.xml i did not changed anything . Is there any Fix?










share|improve this question
















Error Snap



build.gradle file



    apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "io.dume.dume"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
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'
}


I just created a new projects and found this error dramatically on activity_main.xml i did not changed anything . Is there any Fix?







android android-studio gradle android-gradle






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 17 '18 at 17:49









Fantômas

32.6k156388




32.6k156388










asked Jun 17 '18 at 17:16









RushRush

10519




10519













  • May be duplicate of this :stackoverflow.com/a/44858887/9050003

    – mahmoud zaher
    Nov 7 '18 at 13:41





















  • May be duplicate of this :stackoverflow.com/a/44858887/9050003

    – mahmoud zaher
    Nov 7 '18 at 13:41



















May be duplicate of this :stackoverflow.com/a/44858887/9050003

– mahmoud zaher
Nov 7 '18 at 13:41







May be duplicate of this :stackoverflow.com/a/44858887/9050003

– mahmoud zaher
Nov 7 '18 at 13:41














5 Answers
5






active

oldest

votes


















18














I had the same problem. Seems it is a Android Studio bug.



In your styles xml-file change this:



<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">


to this:



<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">


Works for me.






share|improve this answer



















  • 2





    downgrading compact version 28alpha to 27 worked for me

    – That's Enam
    Jun 18 '18 at 8:31



















2














Set your target sdk version to 27 .
Set your compile sdk version to 27 .
And app compat version from 28.0.0-alpha3 to 27.1.1 .



If you still want to use sdk version 28



Just replace alpha3 to alpha1 without changing anything else






share|improve this answer































    1














    This worked for me when that happened, I dont know why it doesn't work with 28:



    //use this instead 
    compileSdkVersion 27
    buildToolsVersion '27.0.3'
    targetSdkVersion 27

    dependencies{

    //switch to these
    implementation 'com.android.support:appcompat-v7:27.0.0-alpha'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.android.support:design:27.0.0'

    }





    share|improve this answer































      0














      I fix this error using 3 methods on YouTube



      Solution






      share|improve this answer































        -1














        This worked for me.



        Open, res --> values --> styles.xml, here you will find a line like this:



        <!-- Base application theme. -->
        <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">


        change it to:



        <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">


        In otherwords, change DarkActionBar to NoActionBar






        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%2f50898835%2ffailed-to-load-appcompat-actionbar-with-unknown-error%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          5 Answers
          5






          active

          oldest

          votes








          5 Answers
          5






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          18














          I had the same problem. Seems it is a Android Studio bug.



          In your styles xml-file change this:



          <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">


          to this:



          <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">


          Works for me.






          share|improve this answer



















          • 2





            downgrading compact version 28alpha to 27 worked for me

            – That's Enam
            Jun 18 '18 at 8:31
















          18














          I had the same problem. Seems it is a Android Studio bug.



          In your styles xml-file change this:



          <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">


          to this:



          <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">


          Works for me.






          share|improve this answer



















          • 2





            downgrading compact version 28alpha to 27 worked for me

            – That's Enam
            Jun 18 '18 at 8:31














          18












          18








          18







          I had the same problem. Seems it is a Android Studio bug.



          In your styles xml-file change this:



          <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">


          to this:



          <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">


          Works for me.






          share|improve this answer













          I had the same problem. Seems it is a Android Studio bug.



          In your styles xml-file change this:



          <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">


          to this:



          <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">


          Works for me.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jun 17 '18 at 19:08









          Anton ProkopovAnton Prokopov

          415213




          415213








          • 2





            downgrading compact version 28alpha to 27 worked for me

            – That's Enam
            Jun 18 '18 at 8:31














          • 2





            downgrading compact version 28alpha to 27 worked for me

            – That's Enam
            Jun 18 '18 at 8:31








          2




          2





          downgrading compact version 28alpha to 27 worked for me

          – That's Enam
          Jun 18 '18 at 8:31





          downgrading compact version 28alpha to 27 worked for me

          – That's Enam
          Jun 18 '18 at 8:31













          2














          Set your target sdk version to 27 .
          Set your compile sdk version to 27 .
          And app compat version from 28.0.0-alpha3 to 27.1.1 .



          If you still want to use sdk version 28



          Just replace alpha3 to alpha1 without changing anything else






          share|improve this answer




























            2














            Set your target sdk version to 27 .
            Set your compile sdk version to 27 .
            And app compat version from 28.0.0-alpha3 to 27.1.1 .



            If you still want to use sdk version 28



            Just replace alpha3 to alpha1 without changing anything else






            share|improve this answer


























              2












              2








              2







              Set your target sdk version to 27 .
              Set your compile sdk version to 27 .
              And app compat version from 28.0.0-alpha3 to 27.1.1 .



              If you still want to use sdk version 28



              Just replace alpha3 to alpha1 without changing anything else






              share|improve this answer













              Set your target sdk version to 27 .
              Set your compile sdk version to 27 .
              And app compat version from 28.0.0-alpha3 to 27.1.1 .



              If you still want to use sdk version 28



              Just replace alpha3 to alpha1 without changing anything else







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Aug 5 '18 at 4:02









              Jaswant SinghJaswant Singh

              919317




              919317























                  1














                  This worked for me when that happened, I dont know why it doesn't work with 28:



                  //use this instead 
                  compileSdkVersion 27
                  buildToolsVersion '27.0.3'
                  targetSdkVersion 27

                  dependencies{

                  //switch to these
                  implementation 'com.android.support:appcompat-v7:27.0.0-alpha'
                  implementation 'com.android.support.constraint:constraint-layout:1.0.2'
                  implementation 'com.android.support:design:27.0.0'

                  }





                  share|improve this answer




























                    1














                    This worked for me when that happened, I dont know why it doesn't work with 28:



                    //use this instead 
                    compileSdkVersion 27
                    buildToolsVersion '27.0.3'
                    targetSdkVersion 27

                    dependencies{

                    //switch to these
                    implementation 'com.android.support:appcompat-v7:27.0.0-alpha'
                    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
                    implementation 'com.android.support:design:27.0.0'

                    }





                    share|improve this answer


























                      1












                      1








                      1







                      This worked for me when that happened, I dont know why it doesn't work with 28:



                      //use this instead 
                      compileSdkVersion 27
                      buildToolsVersion '27.0.3'
                      targetSdkVersion 27

                      dependencies{

                      //switch to these
                      implementation 'com.android.support:appcompat-v7:27.0.0-alpha'
                      implementation 'com.android.support.constraint:constraint-layout:1.0.2'
                      implementation 'com.android.support:design:27.0.0'

                      }





                      share|improve this answer













                      This worked for me when that happened, I dont know why it doesn't work with 28:



                      //use this instead 
                      compileSdkVersion 27
                      buildToolsVersion '27.0.3'
                      targetSdkVersion 27

                      dependencies{

                      //switch to these
                      implementation 'com.android.support:appcompat-v7:27.0.0-alpha'
                      implementation 'com.android.support.constraint:constraint-layout:1.0.2'
                      implementation 'com.android.support:design:27.0.0'

                      }






                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Sep 19 '18 at 18:56









                      S. CapS. Cap

                      111




                      111























                          0














                          I fix this error using 3 methods on YouTube



                          Solution






                          share|improve this answer




























                            0














                            I fix this error using 3 methods on YouTube



                            Solution






                            share|improve this answer


























                              0












                              0








                              0







                              I fix this error using 3 methods on YouTube



                              Solution






                              share|improve this answer













                              I fix this error using 3 methods on YouTube



                              Solution







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Aug 5 '18 at 3:57









                              shellhubshellhub

                              81369




                              81369























                                  -1














                                  This worked for me.



                                  Open, res --> values --> styles.xml, here you will find a line like this:



                                  <!-- Base application theme. -->
                                  <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">


                                  change it to:



                                  <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">


                                  In otherwords, change DarkActionBar to NoActionBar






                                  share|improve this answer




























                                    -1














                                    This worked for me.



                                    Open, res --> values --> styles.xml, here you will find a line like this:



                                    <!-- Base application theme. -->
                                    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">


                                    change it to:



                                    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">


                                    In otherwords, change DarkActionBar to NoActionBar






                                    share|improve this answer


























                                      -1












                                      -1








                                      -1







                                      This worked for me.



                                      Open, res --> values --> styles.xml, here you will find a line like this:



                                      <!-- Base application theme. -->
                                      <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">


                                      change it to:



                                      <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">


                                      In otherwords, change DarkActionBar to NoActionBar






                                      share|improve this answer













                                      This worked for me.



                                      Open, res --> values --> styles.xml, here you will find a line like this:



                                      <!-- Base application theme. -->
                                      <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">


                                      change it to:



                                      <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">


                                      In otherwords, change DarkActionBar to NoActionBar







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Nov 21 '18 at 0:03









                                      Yusuf folahanYusuf folahan

                                      434




                                      434






























                                          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%2f50898835%2ffailed-to-load-appcompat-actionbar-with-unknown-error%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

                                          MongoDB - Not Authorized To Execute Command

                                          How to fix TextFormField cause rebuild widget in Flutter

                                          Npm cannot find a required file even through it is in the searched directory