Build failed with an exception. while generating a signed apk












0















I am trying to build an application. I can able to build the application properly. Also, I can able to generate the application with debug mode. But when I try to generate the signed apk with release mode, I got the below error.



Please help me what went wrong.



The error is as below



:app:validateSigningRelease UP-TO-DATE
:app:packageRelease FAILED


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageRelease'.
> C:UsersBabaProjectApplicationArtharakshakCodeArtharakshakappreleaseapp-release.apk

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 20s
30 actionable tasks: 29 executed, 1 up-to-date


Below is my progourd file



# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:UsersBabaAppDataLocalAndroidSdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-ignorewarnings


Build Version is



dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}









share|improve this question

























  • Did you follow the advice in your console's output, and run it with the --stacktrace option? app:packageRelease --stacktrace. What did it say?

    – PPartisan
    Nov 25 '18 at 14:57











  • Caused by: java.nio.file.AccessDeniedException: C:UsersBabaProjectApplicationArtharakshakCodeArtharakshakappreleaseapp-release.apk at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102) at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269) at

    – Debabrata
    Nov 25 '18 at 15:01











  • I got an error like above

    – Debabrata
    Nov 25 '18 at 15:01
















0















I am trying to build an application. I can able to build the application properly. Also, I can able to generate the application with debug mode. But when I try to generate the signed apk with release mode, I got the below error.



Please help me what went wrong.



The error is as below



:app:validateSigningRelease UP-TO-DATE
:app:packageRelease FAILED


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageRelease'.
> C:UsersBabaProjectApplicationArtharakshakCodeArtharakshakappreleaseapp-release.apk

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 20s
30 actionable tasks: 29 executed, 1 up-to-date


Below is my progourd file



# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:UsersBabaAppDataLocalAndroidSdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-ignorewarnings


Build Version is



dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}









share|improve this question

























  • Did you follow the advice in your console's output, and run it with the --stacktrace option? app:packageRelease --stacktrace. What did it say?

    – PPartisan
    Nov 25 '18 at 14:57











  • Caused by: java.nio.file.AccessDeniedException: C:UsersBabaProjectApplicationArtharakshakCodeArtharakshakappreleaseapp-release.apk at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102) at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269) at

    – Debabrata
    Nov 25 '18 at 15:01











  • I got an error like above

    – Debabrata
    Nov 25 '18 at 15:01














0












0








0








I am trying to build an application. I can able to build the application properly. Also, I can able to generate the application with debug mode. But when I try to generate the signed apk with release mode, I got the below error.



Please help me what went wrong.



The error is as below



:app:validateSigningRelease UP-TO-DATE
:app:packageRelease FAILED


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageRelease'.
> C:UsersBabaProjectApplicationArtharakshakCodeArtharakshakappreleaseapp-release.apk

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 20s
30 actionable tasks: 29 executed, 1 up-to-date


Below is my progourd file



# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:UsersBabaAppDataLocalAndroidSdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-ignorewarnings


Build Version is



dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}









share|improve this question
















I am trying to build an application. I can able to build the application properly. Also, I can able to generate the application with debug mode. But when I try to generate the signed apk with release mode, I got the below error.



Please help me what went wrong.



The error is as below



:app:validateSigningRelease UP-TO-DATE
:app:packageRelease FAILED


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageRelease'.
> C:UsersBabaProjectApplicationArtharakshakCodeArtharakshakappreleaseapp-release.apk

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 20s
30 actionable tasks: 29 executed, 1 up-to-date


Below is my progourd file



# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:UsersBabaAppDataLocalAndroidSdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-ignorewarnings


Build Version is



dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}






android






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 25 '18 at 17:13









Fantômas

32.7k156389




32.7k156389










asked Nov 25 '18 at 14:51









Debabrata Debabrata

6627




6627













  • Did you follow the advice in your console's output, and run it with the --stacktrace option? app:packageRelease --stacktrace. What did it say?

    – PPartisan
    Nov 25 '18 at 14:57











  • Caused by: java.nio.file.AccessDeniedException: C:UsersBabaProjectApplicationArtharakshakCodeArtharakshakappreleaseapp-release.apk at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102) at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269) at

    – Debabrata
    Nov 25 '18 at 15:01











  • I got an error like above

    – Debabrata
    Nov 25 '18 at 15:01



















  • Did you follow the advice in your console's output, and run it with the --stacktrace option? app:packageRelease --stacktrace. What did it say?

    – PPartisan
    Nov 25 '18 at 14:57











  • Caused by: java.nio.file.AccessDeniedException: C:UsersBabaProjectApplicationArtharakshakCodeArtharakshakappreleaseapp-release.apk at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102) at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269) at

    – Debabrata
    Nov 25 '18 at 15:01











  • I got an error like above

    – Debabrata
    Nov 25 '18 at 15:01

















Did you follow the advice in your console's output, and run it with the --stacktrace option? app:packageRelease --stacktrace. What did it say?

– PPartisan
Nov 25 '18 at 14:57





Did you follow the advice in your console's output, and run it with the --stacktrace option? app:packageRelease --stacktrace. What did it say?

– PPartisan
Nov 25 '18 at 14:57













Caused by: java.nio.file.AccessDeniedException: C:UsersBabaProjectApplicationArtharakshakCodeArtharakshakappreleaseapp-release.apk at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102) at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269) at

– Debabrata
Nov 25 '18 at 15:01





Caused by: java.nio.file.AccessDeniedException: C:UsersBabaProjectApplicationArtharakshakCodeArtharakshakappreleaseapp-release.apk at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102) at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269) at

– Debabrata
Nov 25 '18 at 15:01













I got an error like above

– Debabrata
Nov 25 '18 at 15:01





I got an error like above

– Debabrata
Nov 25 '18 at 15:01












1 Answer
1






active

oldest

votes


















0














I got a solution.



Problem Reason:



There is some access issue in windows after upgrading my Android Studio, As a result, an existing project developed on older version could not write the apk in the same place.
Even after cleaning the project will not help.



Solution:



I create a new project in a different location. This helps to build and generate the apk file






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%2f53468700%2fbuild-failed-with-an-exception-while-generating-a-signed-apk%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I got a solution.



    Problem Reason:



    There is some access issue in windows after upgrading my Android Studio, As a result, an existing project developed on older version could not write the apk in the same place.
    Even after cleaning the project will not help.



    Solution:



    I create a new project in a different location. This helps to build and generate the apk file






    share|improve this answer




























      0














      I got a solution.



      Problem Reason:



      There is some access issue in windows after upgrading my Android Studio, As a result, an existing project developed on older version could not write the apk in the same place.
      Even after cleaning the project will not help.



      Solution:



      I create a new project in a different location. This helps to build and generate the apk file






      share|improve this answer


























        0












        0








        0







        I got a solution.



        Problem Reason:



        There is some access issue in windows after upgrading my Android Studio, As a result, an existing project developed on older version could not write the apk in the same place.
        Even after cleaning the project will not help.



        Solution:



        I create a new project in a different location. This helps to build and generate the apk file






        share|improve this answer













        I got a solution.



        Problem Reason:



        There is some access issue in windows after upgrading my Android Studio, As a result, an existing project developed on older version could not write the apk in the same place.
        Even after cleaning the project will not help.



        Solution:



        I create a new project in a different location. This helps to build and generate the apk file







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 25 '18 at 15:43









        Debabrata Debabrata

        6627




        6627
































            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%2f53468700%2fbuild-failed-with-an-exception-while-generating-a-signed-apk%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

            404 Error Contact Form 7 ajax form submitting

            How to know if a Active Directory user can login interactively

            Refactoring coordinates for Minecraft Pi buildings written in Python