Nativescript build failed










0















I'm trying to get my app on an android device. When I run



tns run android


I get this error :



/Users/coreelements/Projects/nativescript/myapp/platforms/android/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:32: AAPT: error: resource
drawable/icon (aka nl.coreelements.myapp:drawable/icon) not found.FAILURE: Build failed with an exception.* What went wrong:
Execution failed for task ':app:processDebugResources'.

Failed to process resources, see aapt output above for details.


I've already tried regenerating the app and splashes :



tns resources generate icons src/images/appicon.png
tns resources generate splashes src/images/appicon.png


What am I missing? I've also tried to buid/run in App Studio.










share|improve this question
























  • Did you make any changes to your AndroidManifest.xml in your App_Resources/Android/src/main? Would you mind sharing what you have in that file?

    – Manoj
    Nov 13 '18 at 11:41











  • rm -rf platforms and then rebuild the app. Also, make sure that the command has successfully generated icons in each folder in App_Resources/Android/src/main/res. Sometimes when passing smaller image not all densities will be generated which will cause this error.

    – Nick Iliev
    Nov 13 '18 at 12:05






  • 1





    Yeah .. kinda figured it out .. So the AndroidManifest.xml has a line android:icon="@drawable/icon" , but when you use tns resources generate icons src/images/appicon.png .. then appicon.png will be transformed and transferred to the drawable folders. So the right notation would be android:icon="@drawable/appicon"

    – fransyozef
    Nov 13 '18 at 12:33















0















I'm trying to get my app on an android device. When I run



tns run android


I get this error :



/Users/coreelements/Projects/nativescript/myapp/platforms/android/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:32: AAPT: error: resource
drawable/icon (aka nl.coreelements.myapp:drawable/icon) not found.FAILURE: Build failed with an exception.* What went wrong:
Execution failed for task ':app:processDebugResources'.

Failed to process resources, see aapt output above for details.


I've already tried regenerating the app and splashes :



tns resources generate icons src/images/appicon.png
tns resources generate splashes src/images/appicon.png


What am I missing? I've also tried to buid/run in App Studio.










share|improve this question
























  • Did you make any changes to your AndroidManifest.xml in your App_Resources/Android/src/main? Would you mind sharing what you have in that file?

    – Manoj
    Nov 13 '18 at 11:41











  • rm -rf platforms and then rebuild the app. Also, make sure that the command has successfully generated icons in each folder in App_Resources/Android/src/main/res. Sometimes when passing smaller image not all densities will be generated which will cause this error.

    – Nick Iliev
    Nov 13 '18 at 12:05






  • 1





    Yeah .. kinda figured it out .. So the AndroidManifest.xml has a line android:icon="@drawable/icon" , but when you use tns resources generate icons src/images/appicon.png .. then appicon.png will be transformed and transferred to the drawable folders. So the right notation would be android:icon="@drawable/appicon"

    – fransyozef
    Nov 13 '18 at 12:33













0












0








0








I'm trying to get my app on an android device. When I run



tns run android


I get this error :



/Users/coreelements/Projects/nativescript/myapp/platforms/android/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:32: AAPT: error: resource
drawable/icon (aka nl.coreelements.myapp:drawable/icon) not found.FAILURE: Build failed with an exception.* What went wrong:
Execution failed for task ':app:processDebugResources'.

Failed to process resources, see aapt output above for details.


I've already tried regenerating the app and splashes :



tns resources generate icons src/images/appicon.png
tns resources generate splashes src/images/appicon.png


What am I missing? I've also tried to buid/run in App Studio.










share|improve this question
















I'm trying to get my app on an android device. When I run



tns run android


I get this error :



/Users/coreelements/Projects/nativescript/myapp/platforms/android/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:32: AAPT: error: resource
drawable/icon (aka nl.coreelements.myapp:drawable/icon) not found.FAILURE: Build failed with an exception.* What went wrong:
Execution failed for task ':app:processDebugResources'.

Failed to process resources, see aapt output above for details.


I've already tried regenerating the app and splashes :



tns resources generate icons src/images/appicon.png
tns resources generate splashes src/images/appicon.png


What am I missing? I've also tried to buid/run in App Studio.







android nativescript






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '18 at 11:18









Fantômas

32.4k156388




32.4k156388










asked Nov 13 '18 at 11:16









fransyozeffransyozef

1408




1408












  • Did you make any changes to your AndroidManifest.xml in your App_Resources/Android/src/main? Would you mind sharing what you have in that file?

    – Manoj
    Nov 13 '18 at 11:41











  • rm -rf platforms and then rebuild the app. Also, make sure that the command has successfully generated icons in each folder in App_Resources/Android/src/main/res. Sometimes when passing smaller image not all densities will be generated which will cause this error.

    – Nick Iliev
    Nov 13 '18 at 12:05






  • 1





    Yeah .. kinda figured it out .. So the AndroidManifest.xml has a line android:icon="@drawable/icon" , but when you use tns resources generate icons src/images/appicon.png .. then appicon.png will be transformed and transferred to the drawable folders. So the right notation would be android:icon="@drawable/appicon"

    – fransyozef
    Nov 13 '18 at 12:33

















  • Did you make any changes to your AndroidManifest.xml in your App_Resources/Android/src/main? Would you mind sharing what you have in that file?

    – Manoj
    Nov 13 '18 at 11:41











  • rm -rf platforms and then rebuild the app. Also, make sure that the command has successfully generated icons in each folder in App_Resources/Android/src/main/res. Sometimes when passing smaller image not all densities will be generated which will cause this error.

    – Nick Iliev
    Nov 13 '18 at 12:05






  • 1





    Yeah .. kinda figured it out .. So the AndroidManifest.xml has a line android:icon="@drawable/icon" , but when you use tns resources generate icons src/images/appicon.png .. then appicon.png will be transformed and transferred to the drawable folders. So the right notation would be android:icon="@drawable/appicon"

    – fransyozef
    Nov 13 '18 at 12:33
















Did you make any changes to your AndroidManifest.xml in your App_Resources/Android/src/main? Would you mind sharing what you have in that file?

– Manoj
Nov 13 '18 at 11:41





Did you make any changes to your AndroidManifest.xml in your App_Resources/Android/src/main? Would you mind sharing what you have in that file?

– Manoj
Nov 13 '18 at 11:41













rm -rf platforms and then rebuild the app. Also, make sure that the command has successfully generated icons in each folder in App_Resources/Android/src/main/res. Sometimes when passing smaller image not all densities will be generated which will cause this error.

– Nick Iliev
Nov 13 '18 at 12:05





rm -rf platforms and then rebuild the app. Also, make sure that the command has successfully generated icons in each folder in App_Resources/Android/src/main/res. Sometimes when passing smaller image not all densities will be generated which will cause this error.

– Nick Iliev
Nov 13 '18 at 12:05




1




1





Yeah .. kinda figured it out .. So the AndroidManifest.xml has a line android:icon="@drawable/icon" , but when you use tns resources generate icons src/images/appicon.png .. then appicon.png will be transformed and transferred to the drawable folders. So the right notation would be android:icon="@drawable/appicon"

– fransyozef
Nov 13 '18 at 12:33





Yeah .. kinda figured it out .. So the AndroidManifest.xml has a line android:icon="@drawable/icon" , but when you use tns resources generate icons src/images/appicon.png .. then appicon.png will be transformed and transferred to the drawable folders. So the right notation would be android:icon="@drawable/appicon"

– fransyozef
Nov 13 '18 at 12:33












1 Answer
1






active

oldest

votes


















1














Just wrapping up the answer from @fransyozef:



App_Resources/Android/src/main/AndroidManifest.xml should point to the right drawable, in this case replacing android:icon="@drawable/icon" with android:icon="@drawable/appicon" solved the issue.






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%2f53279836%2fnativescript-build-failed%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









    1














    Just wrapping up the answer from @fransyozef:



    App_Resources/Android/src/main/AndroidManifest.xml should point to the right drawable, in this case replacing android:icon="@drawable/icon" with android:icon="@drawable/appicon" solved the issue.






    share|improve this answer



























      1














      Just wrapping up the answer from @fransyozef:



      App_Resources/Android/src/main/AndroidManifest.xml should point to the right drawable, in this case replacing android:icon="@drawable/icon" with android:icon="@drawable/appicon" solved the issue.






      share|improve this answer

























        1












        1








        1







        Just wrapping up the answer from @fransyozef:



        App_Resources/Android/src/main/AndroidManifest.xml should point to the right drawable, in this case replacing android:icon="@drawable/icon" with android:icon="@drawable/appicon" solved the issue.






        share|improve this answer













        Just wrapping up the answer from @fransyozef:



        App_Resources/Android/src/main/AndroidManifest.xml should point to the right drawable, in this case replacing android:icon="@drawable/icon" with android:icon="@drawable/appicon" solved the issue.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 13 '18 at 14:06









        ManojManoj

        5,0002921




        5,0002921



























            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%2f53279836%2fnativescript-build-failed%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







            這個網誌中的熱門文章

            Barbados

            How to read a connectionString WITH PROVIDER in .NET Core?

            Node.js Script on GitHub Pages or Amazon S3