Cordova does not create AndroidManifest.xml









up vote
23
down vote

favorite
4












I am working in Cordova and AndroidStudio to create Android/iOS apps. Everything was working fine until I updated my Cordova to 8 yesterday. I also updated Node to the latest. When I create a Cordova project and add the Android platform. It yields a totally different directory structure. I cannot see assets, res and src folders in project's platform directory D:testApp1platformsandroid. More importantly, the above directory is missing AndroidManifest.xml, which is causing the admob plugin to fail in getting added.



Here is the error that I get while adding the plugin:




Failed to install 'cordova-plugin-admobpro': Error: ENOENT: no such file or directory, open 'D:ProjectstestApp1platformsandroidAndroidManifest.xml'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Object.parseElementtreeSync (D:ProjectstestApp1platformsandroidcordovanode_modulescordova-commonsrcutilxml-helpers.js:180:27)
at new AndroidManifest (D:ProjectstestApp1platformsandroidcordovalibAndroidManifest.js:29:20)
at AndroidProject.getPackageName (D:ProjectstestApp1platformsandroidcordovalibAndroidProject.js:99:12)
at Api.addPlugin (D:ProjectstestApp1platformsandroidcordovaApi.js:223:57)
at handleInstall (C:UsersRaoAppDataRoamingnpmnode_modulescordovanode_modulescordova-libsrcplugmaninstall.js:594:10)
at C:UsersRaoAppDataRoamingnpmnode_modulescordovanode_modulescordova-libsrcplugmaninstall.js:357:28
at _fulfilled (C:UsersRaoAppDataRoamingnpmnode_modulescordovanode_modulescordova-libnode_modulesqq.js:787:54)
at self.promiseDispatch.done (C:UsersRaoAppDataRoamingnpmnode_modulescordovanode_modulescordova-libnode_modulesqq.js:816:30)




Can someone please help?










share|improve this question























  • I also ran into the same problem with a missing AndroidManifest.xml file. Although a simple move, this change will incur an ungodly number of hours in required downstream changes. I sure hope this break in compatibility was worth it. BTW, I also noticed that edit-config support is broken on IOS to add plugin usage descriptions to *-Info.plist. Using config-file tag in the interim. Unfortunately, backing up to cordova 7.1.0 works until the change is supported in all dependent plugins.
    – jmelvin
    Dec 23 '17 at 17:16














up vote
23
down vote

favorite
4












I am working in Cordova and AndroidStudio to create Android/iOS apps. Everything was working fine until I updated my Cordova to 8 yesterday. I also updated Node to the latest. When I create a Cordova project and add the Android platform. It yields a totally different directory structure. I cannot see assets, res and src folders in project's platform directory D:testApp1platformsandroid. More importantly, the above directory is missing AndroidManifest.xml, which is causing the admob plugin to fail in getting added.



Here is the error that I get while adding the plugin:




Failed to install 'cordova-plugin-admobpro': Error: ENOENT: no such file or directory, open 'D:ProjectstestApp1platformsandroidAndroidManifest.xml'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Object.parseElementtreeSync (D:ProjectstestApp1platformsandroidcordovanode_modulescordova-commonsrcutilxml-helpers.js:180:27)
at new AndroidManifest (D:ProjectstestApp1platformsandroidcordovalibAndroidManifest.js:29:20)
at AndroidProject.getPackageName (D:ProjectstestApp1platformsandroidcordovalibAndroidProject.js:99:12)
at Api.addPlugin (D:ProjectstestApp1platformsandroidcordovaApi.js:223:57)
at handleInstall (C:UsersRaoAppDataRoamingnpmnode_modulescordovanode_modulescordova-libsrcplugmaninstall.js:594:10)
at C:UsersRaoAppDataRoamingnpmnode_modulescordovanode_modulescordova-libsrcplugmaninstall.js:357:28
at _fulfilled (C:UsersRaoAppDataRoamingnpmnode_modulescordovanode_modulescordova-libnode_modulesqq.js:787:54)
at self.promiseDispatch.done (C:UsersRaoAppDataRoamingnpmnode_modulescordovanode_modulescordova-libnode_modulesqq.js:816:30)




Can someone please help?










share|improve this question























  • I also ran into the same problem with a missing AndroidManifest.xml file. Although a simple move, this change will incur an ungodly number of hours in required downstream changes. I sure hope this break in compatibility was worth it. BTW, I also noticed that edit-config support is broken on IOS to add plugin usage descriptions to *-Info.plist. Using config-file tag in the interim. Unfortunately, backing up to cordova 7.1.0 works until the change is supported in all dependent plugins.
    – jmelvin
    Dec 23 '17 at 17:16












up vote
23
down vote

favorite
4









up vote
23
down vote

favorite
4






4





I am working in Cordova and AndroidStudio to create Android/iOS apps. Everything was working fine until I updated my Cordova to 8 yesterday. I also updated Node to the latest. When I create a Cordova project and add the Android platform. It yields a totally different directory structure. I cannot see assets, res and src folders in project's platform directory D:testApp1platformsandroid. More importantly, the above directory is missing AndroidManifest.xml, which is causing the admob plugin to fail in getting added.



Here is the error that I get while adding the plugin:




Failed to install 'cordova-plugin-admobpro': Error: ENOENT: no such file or directory, open 'D:ProjectstestApp1platformsandroidAndroidManifest.xml'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Object.parseElementtreeSync (D:ProjectstestApp1platformsandroidcordovanode_modulescordova-commonsrcutilxml-helpers.js:180:27)
at new AndroidManifest (D:ProjectstestApp1platformsandroidcordovalibAndroidManifest.js:29:20)
at AndroidProject.getPackageName (D:ProjectstestApp1platformsandroidcordovalibAndroidProject.js:99:12)
at Api.addPlugin (D:ProjectstestApp1platformsandroidcordovaApi.js:223:57)
at handleInstall (C:UsersRaoAppDataRoamingnpmnode_modulescordovanode_modulescordova-libsrcplugmaninstall.js:594:10)
at C:UsersRaoAppDataRoamingnpmnode_modulescordovanode_modulescordova-libsrcplugmaninstall.js:357:28
at _fulfilled (C:UsersRaoAppDataRoamingnpmnode_modulescordovanode_modulescordova-libnode_modulesqq.js:787:54)
at self.promiseDispatch.done (C:UsersRaoAppDataRoamingnpmnode_modulescordovanode_modulescordova-libnode_modulesqq.js:816:30)




Can someone please help?










share|improve this question















I am working in Cordova and AndroidStudio to create Android/iOS apps. Everything was working fine until I updated my Cordova to 8 yesterday. I also updated Node to the latest. When I create a Cordova project and add the Android platform. It yields a totally different directory structure. I cannot see assets, res and src folders in project's platform directory D:testApp1platformsandroid. More importantly, the above directory is missing AndroidManifest.xml, which is causing the admob plugin to fail in getting added.



Here is the error that I get while adding the plugin:




Failed to install 'cordova-plugin-admobpro': Error: ENOENT: no such file or directory, open 'D:ProjectstestApp1platformsandroidAndroidManifest.xml'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Object.parseElementtreeSync (D:ProjectstestApp1platformsandroidcordovanode_modulescordova-commonsrcutilxml-helpers.js:180:27)
at new AndroidManifest (D:ProjectstestApp1platformsandroidcordovalibAndroidManifest.js:29:20)
at AndroidProject.getPackageName (D:ProjectstestApp1platformsandroidcordovalibAndroidProject.js:99:12)
at Api.addPlugin (D:ProjectstestApp1platformsandroidcordovaApi.js:223:57)
at handleInstall (C:UsersRaoAppDataRoamingnpmnode_modulescordovanode_modulescordova-libsrcplugmaninstall.js:594:10)
at C:UsersRaoAppDataRoamingnpmnode_modulescordovanode_modulescordova-libsrcplugmaninstall.js:357:28
at _fulfilled (C:UsersRaoAppDataRoamingnpmnode_modulescordovanode_modulescordova-libnode_modulesqq.js:787:54)
at self.promiseDispatch.done (C:UsersRaoAppDataRoamingnpmnode_modulescordovanode_modulescordova-libnode_modulesqq.js:816:30)




Can someone please help?







android cordova admob phonegap






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 22 '17 at 8:42









dda

5,43021932




5,43021932










asked Dec 21 '17 at 14:14









Kamran

178129




178129











  • I also ran into the same problem with a missing AndroidManifest.xml file. Although a simple move, this change will incur an ungodly number of hours in required downstream changes. I sure hope this break in compatibility was worth it. BTW, I also noticed that edit-config support is broken on IOS to add plugin usage descriptions to *-Info.plist. Using config-file tag in the interim. Unfortunately, backing up to cordova 7.1.0 works until the change is supported in all dependent plugins.
    – jmelvin
    Dec 23 '17 at 17:16
















  • I also ran into the same problem with a missing AndroidManifest.xml file. Although a simple move, this change will incur an ungodly number of hours in required downstream changes. I sure hope this break in compatibility was worth it. BTW, I also noticed that edit-config support is broken on IOS to add plugin usage descriptions to *-Info.plist. Using config-file tag in the interim. Unfortunately, backing up to cordova 7.1.0 works until the change is supported in all dependent plugins.
    – jmelvin
    Dec 23 '17 at 17:16















I also ran into the same problem with a missing AndroidManifest.xml file. Although a simple move, this change will incur an ungodly number of hours in required downstream changes. I sure hope this break in compatibility was worth it. BTW, I also noticed that edit-config support is broken on IOS to add plugin usage descriptions to *-Info.plist. Using config-file tag in the interim. Unfortunately, backing up to cordova 7.1.0 works until the change is supported in all dependent plugins.
– jmelvin
Dec 23 '17 at 17:16




I also ran into the same problem with a missing AndroidManifest.xml file. Although a simple move, this change will incur an ungodly number of hours in required downstream changes. I sure hope this break in compatibility was worth it. BTW, I also noticed that edit-config support is broken on IOS to add plugin usage descriptions to *-Info.plist. Using config-file tag in the interim. Unfortunately, backing up to cordova 7.1.0 works until the change is supported in all dependent plugins.
– jmelvin
Dec 23 '17 at 17:16












7 Answers
7






active

oldest

votes

















up vote
23
down vote



accepted










Final edit:



cordova-android 7.1.2 is out, it should fix most of this kind of problems.



edit:



As people keep upvoting the answer I'll give more details about the problem.



The problem isn't really the plugin writing on the AndroidManifest.xml or on the config.xml. It's true that the location changed and plugins should update the path, but it's not mandatory and Cordova takes care of the new paths.



The problem is some plugins using source-file tag for things that are not source code. (i.e, using it for copying images instead of using resource-file tags)
That creates a res folder (or lib) that confuses Cordova, making it believe it's an old Eclipse project, while it's really an Android studio project, and searches for the files on the old locations instead of looking into the new locations.



This has been patched in cordova-android and will be fixed in next release.
The workaround is to look for the plugin using source-file tag and update it to use resource-file tag



OLD ANSWER:



It is now in app/src/main/AndroidManifest.xml.



If the plugin is writing on it, it should be updated to write on the right place.



Read the cordova-android 7.0.0 release blog post






share|improve this answer






















  • Thank you, that helped.
    – Kamran
    Dec 22 '17 at 10:58






  • 3




    If you have a 'res' folder in the root of your project you will still get this error even after updating the path inside plugin.xml (Due to Eclipse project detection)
    – Ryan Williams
    Jan 18 at 6:19










  • @RyanWilliams if you are using Cordova CLI 8 yo don't have to change paths inside plugin.xml, only paths in hooks or other things writing the files. Whatever is creating that res folder should be modified. As you say, Cordova check for that folder to know if it's an Android Studio project or an Eclipse project, so if it's and Android Studio project but finds the res folder it goes crazy and make strange things.
    – jcesarmobile
    Jan 18 at 11:04










  • I am using this plugin which doesn't even specify AndroidManifest in plugin.xml yet it still doesn't install. What gives?
    – huggie
    Mar 26 at 9:52






  • 1




    In the plugin.xml
    – jcesarmobile
    Aug 25 at 12:57

















up vote
32
down vote













Cordova CLI v8.0 will use cordova-android@7.0.0 by default.



As most of the cordova plugins do not support cordova-android@7.0.0 yet, you can also try using the older one by specifying version:



cordova platform add android@6.4.0



Or, if you feel comfortable to use cordova-android@7.0.0, you can also wait for a update on cordova-plugi-admobpro to support the cordova-android@7.0.0, it's coming soon.






share|improve this answer
















  • 1




    saved my day! Worked for me.
    – Sandi Laufenberg-Deku
    Jan 4 at 0:23






  • 1




    this should be the accepted answer
    – resizemyimg.com
    Jun 20 at 17:51










  • cordova platform add android@6.4.0 worked for me
    – Lightbeard
    Aug 9 at 19:01






  • 1




    that just broke everything...:S
    – sputn1k
    Sep 5 at 11:32

















up vote
4
down vote













In config.xml file of the cordova project, under xml tag <platform name="android"> section, Add the following tag:



<resource-file src="platforms/android/app/src/main/AndroidManifest.xml" target="AndroidManifest.xml" />





share|improve this answer





























    up vote
    2
    down vote













    I simply fixed the error by copying AndroidManifest.xml
    in




    platformsandroidappsrcmain




    to




    platformsandroid







    share|improve this answer


















    • 3




      no, don't do that. You'll get rid of the error, but you are not fixing anything.
      – jcesarmobile
      Mar 20 at 14:54










    • @jcesarmobile: would be great if you can please guide me on this stackoverflow.com/questions/50017635/…
      – sqlchild
      Apr 25 at 8:40


















    up vote
    0
    down vote













    1. Firstly make sure the plugin supports cordova android 7.0.0+

    2. Delete all of these folder or file: ['AndroidManifest.xml', 'libs', 'res'] in the platforms/android root directory.

    Cordova use these files to determine if your project is an eclipse project. If they are existed, your project will be treated as an eclipse project with the old path structure. Some plugin may create these files/folders on your android folder.






    share|improve this answer



























      up vote
      0
      down vote













      The problem appears to be when you try to build for release at the same time you are running the App locally. I stop the App on localhost and then build for release. Problem solved.






      share|improve this answer



























        up vote
        0
        down vote













        My problem was a custom plugin creating the libs folder in platformsandroid. That made Cordova believe that my project was an eclipse project and therefore it was looking for the AndroidManifest in the old place.



        If you upgrande to Cordova Android +7.0.0 make sure that platformsandroid doesn't contain the following items:



        • AndroidManifest.xml

        • libs

        • res

        this link helped






        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',
          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%2f47926796%2fcordova-does-not-create-androidmanifest-xml%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          7 Answers
          7






          active

          oldest

          votes








          7 Answers
          7






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          23
          down vote



          accepted










          Final edit:



          cordova-android 7.1.2 is out, it should fix most of this kind of problems.



          edit:



          As people keep upvoting the answer I'll give more details about the problem.



          The problem isn't really the plugin writing on the AndroidManifest.xml or on the config.xml. It's true that the location changed and plugins should update the path, but it's not mandatory and Cordova takes care of the new paths.



          The problem is some plugins using source-file tag for things that are not source code. (i.e, using it for copying images instead of using resource-file tags)
          That creates a res folder (or lib) that confuses Cordova, making it believe it's an old Eclipse project, while it's really an Android studio project, and searches for the files on the old locations instead of looking into the new locations.



          This has been patched in cordova-android and will be fixed in next release.
          The workaround is to look for the plugin using source-file tag and update it to use resource-file tag



          OLD ANSWER:



          It is now in app/src/main/AndroidManifest.xml.



          If the plugin is writing on it, it should be updated to write on the right place.



          Read the cordova-android 7.0.0 release blog post






          share|improve this answer






















          • Thank you, that helped.
            – Kamran
            Dec 22 '17 at 10:58






          • 3




            If you have a 'res' folder in the root of your project you will still get this error even after updating the path inside plugin.xml (Due to Eclipse project detection)
            – Ryan Williams
            Jan 18 at 6:19










          • @RyanWilliams if you are using Cordova CLI 8 yo don't have to change paths inside plugin.xml, only paths in hooks or other things writing the files. Whatever is creating that res folder should be modified. As you say, Cordova check for that folder to know if it's an Android Studio project or an Eclipse project, so if it's and Android Studio project but finds the res folder it goes crazy and make strange things.
            – jcesarmobile
            Jan 18 at 11:04










          • I am using this plugin which doesn't even specify AndroidManifest in plugin.xml yet it still doesn't install. What gives?
            – huggie
            Mar 26 at 9:52






          • 1




            In the plugin.xml
            – jcesarmobile
            Aug 25 at 12:57














          up vote
          23
          down vote



          accepted










          Final edit:



          cordova-android 7.1.2 is out, it should fix most of this kind of problems.



          edit:



          As people keep upvoting the answer I'll give more details about the problem.



          The problem isn't really the plugin writing on the AndroidManifest.xml or on the config.xml. It's true that the location changed and plugins should update the path, but it's not mandatory and Cordova takes care of the new paths.



          The problem is some plugins using source-file tag for things that are not source code. (i.e, using it for copying images instead of using resource-file tags)
          That creates a res folder (or lib) that confuses Cordova, making it believe it's an old Eclipse project, while it's really an Android studio project, and searches for the files on the old locations instead of looking into the new locations.



          This has been patched in cordova-android and will be fixed in next release.
          The workaround is to look for the plugin using source-file tag and update it to use resource-file tag



          OLD ANSWER:



          It is now in app/src/main/AndroidManifest.xml.



          If the plugin is writing on it, it should be updated to write on the right place.



          Read the cordova-android 7.0.0 release blog post






          share|improve this answer






















          • Thank you, that helped.
            – Kamran
            Dec 22 '17 at 10:58






          • 3




            If you have a 'res' folder in the root of your project you will still get this error even after updating the path inside plugin.xml (Due to Eclipse project detection)
            – Ryan Williams
            Jan 18 at 6:19










          • @RyanWilliams if you are using Cordova CLI 8 yo don't have to change paths inside plugin.xml, only paths in hooks or other things writing the files. Whatever is creating that res folder should be modified. As you say, Cordova check for that folder to know if it's an Android Studio project or an Eclipse project, so if it's and Android Studio project but finds the res folder it goes crazy and make strange things.
            – jcesarmobile
            Jan 18 at 11:04










          • I am using this plugin which doesn't even specify AndroidManifest in plugin.xml yet it still doesn't install. What gives?
            – huggie
            Mar 26 at 9:52






          • 1




            In the plugin.xml
            – jcesarmobile
            Aug 25 at 12:57












          up vote
          23
          down vote



          accepted







          up vote
          23
          down vote



          accepted






          Final edit:



          cordova-android 7.1.2 is out, it should fix most of this kind of problems.



          edit:



          As people keep upvoting the answer I'll give more details about the problem.



          The problem isn't really the plugin writing on the AndroidManifest.xml or on the config.xml. It's true that the location changed and plugins should update the path, but it's not mandatory and Cordova takes care of the new paths.



          The problem is some plugins using source-file tag for things that are not source code. (i.e, using it for copying images instead of using resource-file tags)
          That creates a res folder (or lib) that confuses Cordova, making it believe it's an old Eclipse project, while it's really an Android studio project, and searches for the files on the old locations instead of looking into the new locations.



          This has been patched in cordova-android and will be fixed in next release.
          The workaround is to look for the plugin using source-file tag and update it to use resource-file tag



          OLD ANSWER:



          It is now in app/src/main/AndroidManifest.xml.



          If the plugin is writing on it, it should be updated to write on the right place.



          Read the cordova-android 7.0.0 release blog post






          share|improve this answer














          Final edit:



          cordova-android 7.1.2 is out, it should fix most of this kind of problems.



          edit:



          As people keep upvoting the answer I'll give more details about the problem.



          The problem isn't really the plugin writing on the AndroidManifest.xml or on the config.xml. It's true that the location changed and plugins should update the path, but it's not mandatory and Cordova takes care of the new paths.



          The problem is some plugins using source-file tag for things that are not source code. (i.e, using it for copying images instead of using resource-file tags)
          That creates a res folder (or lib) that confuses Cordova, making it believe it's an old Eclipse project, while it's really an Android studio project, and searches for the files on the old locations instead of looking into the new locations.



          This has been patched in cordova-android and will be fixed in next release.
          The workaround is to look for the plugin using source-file tag and update it to use resource-file tag



          OLD ANSWER:



          It is now in app/src/main/AndroidManifest.xml.



          If the plugin is writing on it, it should be updated to write on the right place.



          Read the cordova-android 7.0.0 release blog post







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 9 at 19:05

























          answered Dec 21 '17 at 14:38









          jcesarmobile

          35.1k774120




          35.1k774120











          • Thank you, that helped.
            – Kamran
            Dec 22 '17 at 10:58






          • 3




            If you have a 'res' folder in the root of your project you will still get this error even after updating the path inside plugin.xml (Due to Eclipse project detection)
            – Ryan Williams
            Jan 18 at 6:19










          • @RyanWilliams if you are using Cordova CLI 8 yo don't have to change paths inside plugin.xml, only paths in hooks or other things writing the files. Whatever is creating that res folder should be modified. As you say, Cordova check for that folder to know if it's an Android Studio project or an Eclipse project, so if it's and Android Studio project but finds the res folder it goes crazy and make strange things.
            – jcesarmobile
            Jan 18 at 11:04










          • I am using this plugin which doesn't even specify AndroidManifest in plugin.xml yet it still doesn't install. What gives?
            – huggie
            Mar 26 at 9:52






          • 1




            In the plugin.xml
            – jcesarmobile
            Aug 25 at 12:57
















          • Thank you, that helped.
            – Kamran
            Dec 22 '17 at 10:58






          • 3




            If you have a 'res' folder in the root of your project you will still get this error even after updating the path inside plugin.xml (Due to Eclipse project detection)
            – Ryan Williams
            Jan 18 at 6:19










          • @RyanWilliams if you are using Cordova CLI 8 yo don't have to change paths inside plugin.xml, only paths in hooks or other things writing the files. Whatever is creating that res folder should be modified. As you say, Cordova check for that folder to know if it's an Android Studio project or an Eclipse project, so if it's and Android Studio project but finds the res folder it goes crazy and make strange things.
            – jcesarmobile
            Jan 18 at 11:04










          • I am using this plugin which doesn't even specify AndroidManifest in plugin.xml yet it still doesn't install. What gives?
            – huggie
            Mar 26 at 9:52






          • 1




            In the plugin.xml
            – jcesarmobile
            Aug 25 at 12:57















          Thank you, that helped.
          – Kamran
          Dec 22 '17 at 10:58




          Thank you, that helped.
          – Kamran
          Dec 22 '17 at 10:58




          3




          3




          If you have a 'res' folder in the root of your project you will still get this error even after updating the path inside plugin.xml (Due to Eclipse project detection)
          – Ryan Williams
          Jan 18 at 6:19




          If you have a 'res' folder in the root of your project you will still get this error even after updating the path inside plugin.xml (Due to Eclipse project detection)
          – Ryan Williams
          Jan 18 at 6:19












          @RyanWilliams if you are using Cordova CLI 8 yo don't have to change paths inside plugin.xml, only paths in hooks or other things writing the files. Whatever is creating that res folder should be modified. As you say, Cordova check for that folder to know if it's an Android Studio project or an Eclipse project, so if it's and Android Studio project but finds the res folder it goes crazy and make strange things.
          – jcesarmobile
          Jan 18 at 11:04




          @RyanWilliams if you are using Cordova CLI 8 yo don't have to change paths inside plugin.xml, only paths in hooks or other things writing the files. Whatever is creating that res folder should be modified. As you say, Cordova check for that folder to know if it's an Android Studio project or an Eclipse project, so if it's and Android Studio project but finds the res folder it goes crazy and make strange things.
          – jcesarmobile
          Jan 18 at 11:04












          I am using this plugin which doesn't even specify AndroidManifest in plugin.xml yet it still doesn't install. What gives?
          – huggie
          Mar 26 at 9:52




          I am using this plugin which doesn't even specify AndroidManifest in plugin.xml yet it still doesn't install. What gives?
          – huggie
          Mar 26 at 9:52




          1




          1




          In the plugin.xml
          – jcesarmobile
          Aug 25 at 12:57




          In the plugin.xml
          – jcesarmobile
          Aug 25 at 12:57












          up vote
          32
          down vote













          Cordova CLI v8.0 will use cordova-android@7.0.0 by default.



          As most of the cordova plugins do not support cordova-android@7.0.0 yet, you can also try using the older one by specifying version:



          cordova platform add android@6.4.0



          Or, if you feel comfortable to use cordova-android@7.0.0, you can also wait for a update on cordova-plugi-admobpro to support the cordova-android@7.0.0, it's coming soon.






          share|improve this answer
















          • 1




            saved my day! Worked for me.
            – Sandi Laufenberg-Deku
            Jan 4 at 0:23






          • 1




            this should be the accepted answer
            – resizemyimg.com
            Jun 20 at 17:51










          • cordova platform add android@6.4.0 worked for me
            – Lightbeard
            Aug 9 at 19:01






          • 1




            that just broke everything...:S
            – sputn1k
            Sep 5 at 11:32














          up vote
          32
          down vote













          Cordova CLI v8.0 will use cordova-android@7.0.0 by default.



          As most of the cordova plugins do not support cordova-android@7.0.0 yet, you can also try using the older one by specifying version:



          cordova platform add android@6.4.0



          Or, if you feel comfortable to use cordova-android@7.0.0, you can also wait for a update on cordova-plugi-admobpro to support the cordova-android@7.0.0, it's coming soon.






          share|improve this answer
















          • 1




            saved my day! Worked for me.
            – Sandi Laufenberg-Deku
            Jan 4 at 0:23






          • 1




            this should be the accepted answer
            – resizemyimg.com
            Jun 20 at 17:51










          • cordova platform add android@6.4.0 worked for me
            – Lightbeard
            Aug 9 at 19:01






          • 1




            that just broke everything...:S
            – sputn1k
            Sep 5 at 11:32












          up vote
          32
          down vote










          up vote
          32
          down vote









          Cordova CLI v8.0 will use cordova-android@7.0.0 by default.



          As most of the cordova plugins do not support cordova-android@7.0.0 yet, you can also try using the older one by specifying version:



          cordova platform add android@6.4.0



          Or, if you feel comfortable to use cordova-android@7.0.0, you can also wait for a update on cordova-plugi-admobpro to support the cordova-android@7.0.0, it's coming soon.






          share|improve this answer












          Cordova CLI v8.0 will use cordova-android@7.0.0 by default.



          As most of the cordova plugins do not support cordova-android@7.0.0 yet, you can also try using the older one by specifying version:



          cordova platform add android@6.4.0



          Or, if you feel comfortable to use cordova-android@7.0.0, you can also wait for a update on cordova-plugi-admobpro to support the cordova-android@7.0.0, it's coming soon.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 22 '17 at 8:12









          Raymond Xie

          1,175819




          1,175819







          • 1




            saved my day! Worked for me.
            – Sandi Laufenberg-Deku
            Jan 4 at 0:23






          • 1




            this should be the accepted answer
            – resizemyimg.com
            Jun 20 at 17:51










          • cordova platform add android@6.4.0 worked for me
            – Lightbeard
            Aug 9 at 19:01






          • 1




            that just broke everything...:S
            – sputn1k
            Sep 5 at 11:32












          • 1




            saved my day! Worked for me.
            – Sandi Laufenberg-Deku
            Jan 4 at 0:23






          • 1




            this should be the accepted answer
            – resizemyimg.com
            Jun 20 at 17:51










          • cordova platform add android@6.4.0 worked for me
            – Lightbeard
            Aug 9 at 19:01






          • 1




            that just broke everything...:S
            – sputn1k
            Sep 5 at 11:32







          1




          1




          saved my day! Worked for me.
          – Sandi Laufenberg-Deku
          Jan 4 at 0:23




          saved my day! Worked for me.
          – Sandi Laufenberg-Deku
          Jan 4 at 0:23




          1




          1




          this should be the accepted answer
          – resizemyimg.com
          Jun 20 at 17:51




          this should be the accepted answer
          – resizemyimg.com
          Jun 20 at 17:51












          cordova platform add android@6.4.0 worked for me
          – Lightbeard
          Aug 9 at 19:01




          cordova platform add android@6.4.0 worked for me
          – Lightbeard
          Aug 9 at 19:01




          1




          1




          that just broke everything...:S
          – sputn1k
          Sep 5 at 11:32




          that just broke everything...:S
          – sputn1k
          Sep 5 at 11:32










          up vote
          4
          down vote













          In config.xml file of the cordova project, under xml tag <platform name="android"> section, Add the following tag:



          <resource-file src="platforms/android/app/src/main/AndroidManifest.xml" target="AndroidManifest.xml" />





          share|improve this answer


























            up vote
            4
            down vote













            In config.xml file of the cordova project, under xml tag <platform name="android"> section, Add the following tag:



            <resource-file src="platforms/android/app/src/main/AndroidManifest.xml" target="AndroidManifest.xml" />





            share|improve this answer
























              up vote
              4
              down vote










              up vote
              4
              down vote









              In config.xml file of the cordova project, under xml tag <platform name="android"> section, Add the following tag:



              <resource-file src="platforms/android/app/src/main/AndroidManifest.xml" target="AndroidManifest.xml" />





              share|improve this answer














              In config.xml file of the cordova project, under xml tag <platform name="android"> section, Add the following tag:



              <resource-file src="platforms/android/app/src/main/AndroidManifest.xml" target="AndroidManifest.xml" />






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Oct 28 at 23:47









              nyluje

              1,69732243




              1,69732243










              answered Jun 19 at 9:02









              Sukalyan Debsingha

              4912




              4912




















                  up vote
                  2
                  down vote













                  I simply fixed the error by copying AndroidManifest.xml
                  in




                  platformsandroidappsrcmain




                  to




                  platformsandroid







                  share|improve this answer


















                  • 3




                    no, don't do that. You'll get rid of the error, but you are not fixing anything.
                    – jcesarmobile
                    Mar 20 at 14:54










                  • @jcesarmobile: would be great if you can please guide me on this stackoverflow.com/questions/50017635/…
                    – sqlchild
                    Apr 25 at 8:40















                  up vote
                  2
                  down vote













                  I simply fixed the error by copying AndroidManifest.xml
                  in




                  platformsandroidappsrcmain




                  to




                  platformsandroid







                  share|improve this answer


















                  • 3




                    no, don't do that. You'll get rid of the error, but you are not fixing anything.
                    – jcesarmobile
                    Mar 20 at 14:54










                  • @jcesarmobile: would be great if you can please guide me on this stackoverflow.com/questions/50017635/…
                    – sqlchild
                    Apr 25 at 8:40













                  up vote
                  2
                  down vote










                  up vote
                  2
                  down vote









                  I simply fixed the error by copying AndroidManifest.xml
                  in




                  platformsandroidappsrcmain




                  to




                  platformsandroid







                  share|improve this answer














                  I simply fixed the error by copying AndroidManifest.xml
                  in




                  platformsandroidappsrcmain




                  to




                  platformsandroid








                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Apr 25 at 11:22









                  sqlchild

                  3,2902586149




                  3,2902586149










                  answered Feb 7 at 3:37









                  JeffNhan

                  1073




                  1073







                  • 3




                    no, don't do that. You'll get rid of the error, but you are not fixing anything.
                    – jcesarmobile
                    Mar 20 at 14:54










                  • @jcesarmobile: would be great if you can please guide me on this stackoverflow.com/questions/50017635/…
                    – sqlchild
                    Apr 25 at 8:40













                  • 3




                    no, don't do that. You'll get rid of the error, but you are not fixing anything.
                    – jcesarmobile
                    Mar 20 at 14:54










                  • @jcesarmobile: would be great if you can please guide me on this stackoverflow.com/questions/50017635/…
                    – sqlchild
                    Apr 25 at 8:40








                  3




                  3




                  no, don't do that. You'll get rid of the error, but you are not fixing anything.
                  – jcesarmobile
                  Mar 20 at 14:54




                  no, don't do that. You'll get rid of the error, but you are not fixing anything.
                  – jcesarmobile
                  Mar 20 at 14:54












                  @jcesarmobile: would be great if you can please guide me on this stackoverflow.com/questions/50017635/…
                  – sqlchild
                  Apr 25 at 8:40





                  @jcesarmobile: would be great if you can please guide me on this stackoverflow.com/questions/50017635/…
                  – sqlchild
                  Apr 25 at 8:40











                  up vote
                  0
                  down vote













                  1. Firstly make sure the plugin supports cordova android 7.0.0+

                  2. Delete all of these folder or file: ['AndroidManifest.xml', 'libs', 'res'] in the platforms/android root directory.

                  Cordova use these files to determine if your project is an eclipse project. If they are existed, your project will be treated as an eclipse project with the old path structure. Some plugin may create these files/folders on your android folder.






                  share|improve this answer
























                    up vote
                    0
                    down vote













                    1. Firstly make sure the plugin supports cordova android 7.0.0+

                    2. Delete all of these folder or file: ['AndroidManifest.xml', 'libs', 'res'] in the platforms/android root directory.

                    Cordova use these files to determine if your project is an eclipse project. If they are existed, your project will be treated as an eclipse project with the old path structure. Some plugin may create these files/folders on your android folder.






                    share|improve this answer






















                      up vote
                      0
                      down vote










                      up vote
                      0
                      down vote









                      1. Firstly make sure the plugin supports cordova android 7.0.0+

                      2. Delete all of these folder or file: ['AndroidManifest.xml', 'libs', 'res'] in the platforms/android root directory.

                      Cordova use these files to determine if your project is an eclipse project. If they are existed, your project will be treated as an eclipse project with the old path structure. Some plugin may create these files/folders on your android folder.






                      share|improve this answer












                      1. Firstly make sure the plugin supports cordova android 7.0.0+

                      2. Delete all of these folder or file: ['AndroidManifest.xml', 'libs', 'res'] in the platforms/android root directory.

                      Cordova use these files to determine if your project is an eclipse project. If they are existed, your project will be treated as an eclipse project with the old path structure. Some plugin may create these files/folders on your android folder.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Jun 30 at 9:06









                      johnny

                      2,9101119




                      2,9101119




















                          up vote
                          0
                          down vote













                          The problem appears to be when you try to build for release at the same time you are running the App locally. I stop the App on localhost and then build for release. Problem solved.






                          share|improve this answer
























                            up vote
                            0
                            down vote













                            The problem appears to be when you try to build for release at the same time you are running the App locally. I stop the App on localhost and then build for release. Problem solved.






                            share|improve this answer






















                              up vote
                              0
                              down vote










                              up vote
                              0
                              down vote









                              The problem appears to be when you try to build for release at the same time you are running the App locally. I stop the App on localhost and then build for release. Problem solved.






                              share|improve this answer












                              The problem appears to be when you try to build for release at the same time you are running the App locally. I stop the App on localhost and then build for release. Problem solved.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Oct 18 at 3:01









                              Ezequias Aramburu

                              1




                              1




















                                  up vote
                                  0
                                  down vote













                                  My problem was a custom plugin creating the libs folder in platformsandroid. That made Cordova believe that my project was an eclipse project and therefore it was looking for the AndroidManifest in the old place.



                                  If you upgrande to Cordova Android +7.0.0 make sure that platformsandroid doesn't contain the following items:



                                  • AndroidManifest.xml

                                  • libs

                                  • res

                                  this link helped






                                  share|improve this answer


























                                    up vote
                                    0
                                    down vote













                                    My problem was a custom plugin creating the libs folder in platformsandroid. That made Cordova believe that my project was an eclipse project and therefore it was looking for the AndroidManifest in the old place.



                                    If you upgrande to Cordova Android +7.0.0 make sure that platformsandroid doesn't contain the following items:



                                    • AndroidManifest.xml

                                    • libs

                                    • res

                                    this link helped






                                    share|improve this answer
























                                      up vote
                                      0
                                      down vote










                                      up vote
                                      0
                                      down vote









                                      My problem was a custom plugin creating the libs folder in platformsandroid. That made Cordova believe that my project was an eclipse project and therefore it was looking for the AndroidManifest in the old place.



                                      If you upgrande to Cordova Android +7.0.0 make sure that platformsandroid doesn't contain the following items:



                                      • AndroidManifest.xml

                                      • libs

                                      • res

                                      this link helped






                                      share|improve this answer














                                      My problem was a custom plugin creating the libs folder in platformsandroid. That made Cordova believe that my project was an eclipse project and therefore it was looking for the AndroidManifest in the old place.



                                      If you upgrande to Cordova Android +7.0.0 make sure that platformsandroid doesn't contain the following items:



                                      • AndroidManifest.xml

                                      • libs

                                      • res

                                      this link helped







                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      edited Oct 31 at 15:09

























                                      answered Oct 24 at 14:51









                                      Alessandro Lallo

                                      686917




                                      686917



























                                           

                                          draft saved


                                          draft discarded















































                                           


                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function ()
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f47926796%2fcordova-does-not-create-androidmanifest-xml%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

                                          Use pre created SQLite database for Android project in kotlin

                                          Darth Vader #20

                                          Ondo