AAPT error in Android studio while building the project












2















I have been getting this error while building my android project. I was not getting this error before but recently I updated my gradle version for supporting instant apps.
I'm wondering if thats what causing the issue.




Execution failed for task ':vuclip:processProdAutoFeatureResources'.
AAPT2 aapt2-3.2.1-4818971-osx Daemon #0: Unexpected error during link, attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.




Edit : The code is compiling fine but while building the apk using the command ./gradlew clean build, the build is failing with the above exception.



build.gradle



apply plugin: 'com.android.feature'

android {
compileSdkVersion buildVersion.targetSdk

defaultConfig {
baseFeature true
minSdkVersion buildVersion.minSdk
targetSdkVersion buildVersion.targetSdk
multiDexEnabled = true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}

buildTypes {

release {
debuggable false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
lintOptions {
disable 'MissingTranslation'
checkReleaseBuilds false
abortOnError false
}
}

debug {
debuggable true
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
versionNameSuffix "-debug"
}

e2e {
initWith debug
debuggable true
minifyEnabled false
versionNameSuffix "-e2e"
}
auto {
initWith release
debuggable true
versionNameSuffix "-auto"
}
}

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
application project(':viuapp')
feature project(':discover')
api "com.android.support:appcompat-v7:$versions.supportLibrary"
api "com.android.support:design:$versions.supportLibrary"
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
api project(':boot')
api project(':utilities')
api project(':analytics')
api project(':viu-logger')
api project(':fonts')
api project(':viu-constants')
api project(':app_context')
api project(':storage')
api project(':datamodels')
}
repositories {
mavenCentral()
}









share|improve this question

























  • Can you post your gradle file?

    – tomerpacific
    Dec 31 '18 at 9:55











  • Done. This is the build.gradle of my base feature. I guess this is what you want.

    – Ezio
    Dec 31 '18 at 10:01











  • What's the previous gradle version you were working with and what is the one you upgraded to?

    – tomerpacific
    Dec 31 '18 at 10:09











  • Previously it was 2.3.3 and now it is 3.2.1

    – Ezio
    Dec 31 '18 at 10:10











  • Have you gone over this? Don't know the intricacies of your project.

    – tomerpacific
    Dec 31 '18 at 10:18
















2















I have been getting this error while building my android project. I was not getting this error before but recently I updated my gradle version for supporting instant apps.
I'm wondering if thats what causing the issue.




Execution failed for task ':vuclip:processProdAutoFeatureResources'.
AAPT2 aapt2-3.2.1-4818971-osx Daemon #0: Unexpected error during link, attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.




Edit : The code is compiling fine but while building the apk using the command ./gradlew clean build, the build is failing with the above exception.



build.gradle



apply plugin: 'com.android.feature'

android {
compileSdkVersion buildVersion.targetSdk

defaultConfig {
baseFeature true
minSdkVersion buildVersion.minSdk
targetSdkVersion buildVersion.targetSdk
multiDexEnabled = true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}

buildTypes {

release {
debuggable false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
lintOptions {
disable 'MissingTranslation'
checkReleaseBuilds false
abortOnError false
}
}

debug {
debuggable true
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
versionNameSuffix "-debug"
}

e2e {
initWith debug
debuggable true
minifyEnabled false
versionNameSuffix "-e2e"
}
auto {
initWith release
debuggable true
versionNameSuffix "-auto"
}
}

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
application project(':viuapp')
feature project(':discover')
api "com.android.support:appcompat-v7:$versions.supportLibrary"
api "com.android.support:design:$versions.supportLibrary"
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
api project(':boot')
api project(':utilities')
api project(':analytics')
api project(':viu-logger')
api project(':fonts')
api project(':viu-constants')
api project(':app_context')
api project(':storage')
api project(':datamodels')
}
repositories {
mavenCentral()
}









share|improve this question

























  • Can you post your gradle file?

    – tomerpacific
    Dec 31 '18 at 9:55











  • Done. This is the build.gradle of my base feature. I guess this is what you want.

    – Ezio
    Dec 31 '18 at 10:01











  • What's the previous gradle version you were working with and what is the one you upgraded to?

    – tomerpacific
    Dec 31 '18 at 10:09











  • Previously it was 2.3.3 and now it is 3.2.1

    – Ezio
    Dec 31 '18 at 10:10











  • Have you gone over this? Don't know the intricacies of your project.

    – tomerpacific
    Dec 31 '18 at 10:18














2












2








2








I have been getting this error while building my android project. I was not getting this error before but recently I updated my gradle version for supporting instant apps.
I'm wondering if thats what causing the issue.




Execution failed for task ':vuclip:processProdAutoFeatureResources'.
AAPT2 aapt2-3.2.1-4818971-osx Daemon #0: Unexpected error during link, attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.




Edit : The code is compiling fine but while building the apk using the command ./gradlew clean build, the build is failing with the above exception.



build.gradle



apply plugin: 'com.android.feature'

android {
compileSdkVersion buildVersion.targetSdk

defaultConfig {
baseFeature true
minSdkVersion buildVersion.minSdk
targetSdkVersion buildVersion.targetSdk
multiDexEnabled = true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}

buildTypes {

release {
debuggable false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
lintOptions {
disable 'MissingTranslation'
checkReleaseBuilds false
abortOnError false
}
}

debug {
debuggable true
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
versionNameSuffix "-debug"
}

e2e {
initWith debug
debuggable true
minifyEnabled false
versionNameSuffix "-e2e"
}
auto {
initWith release
debuggable true
versionNameSuffix "-auto"
}
}

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
application project(':viuapp')
feature project(':discover')
api "com.android.support:appcompat-v7:$versions.supportLibrary"
api "com.android.support:design:$versions.supportLibrary"
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
api project(':boot')
api project(':utilities')
api project(':analytics')
api project(':viu-logger')
api project(':fonts')
api project(':viu-constants')
api project(':app_context')
api project(':storage')
api project(':datamodels')
}
repositories {
mavenCentral()
}









share|improve this question
















I have been getting this error while building my android project. I was not getting this error before but recently I updated my gradle version for supporting instant apps.
I'm wondering if thats what causing the issue.




Execution failed for task ':vuclip:processProdAutoFeatureResources'.
AAPT2 aapt2-3.2.1-4818971-osx Daemon #0: Unexpected error during link, attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.




Edit : The code is compiling fine but while building the apk using the command ./gradlew clean build, the build is failing with the above exception.



build.gradle



apply plugin: 'com.android.feature'

android {
compileSdkVersion buildVersion.targetSdk

defaultConfig {
baseFeature true
minSdkVersion buildVersion.minSdk
targetSdkVersion buildVersion.targetSdk
multiDexEnabled = true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}

buildTypes {

release {
debuggable false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
lintOptions {
disable 'MissingTranslation'
checkReleaseBuilds false
abortOnError false
}
}

debug {
debuggable true
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
versionNameSuffix "-debug"
}

e2e {
initWith debug
debuggable true
minifyEnabled false
versionNameSuffix "-e2e"
}
auto {
initWith release
debuggable true
versionNameSuffix "-auto"
}
}

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
application project(':viuapp')
feature project(':discover')
api "com.android.support:appcompat-v7:$versions.supportLibrary"
api "com.android.support:design:$versions.supportLibrary"
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
api project(':boot')
api project(':utilities')
api project(':analytics')
api project(':viu-logger')
api project(':fonts')
api project(':viu-constants')
api project(':app_context')
api project(':storage')
api project(':datamodels')
}
repositories {
mavenCentral()
}






android gradle






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 31 '18 at 9:56







Ezio

















asked Dec 31 '18 at 9:53









EzioEzio

1,2111323




1,2111323













  • Can you post your gradle file?

    – tomerpacific
    Dec 31 '18 at 9:55











  • Done. This is the build.gradle of my base feature. I guess this is what you want.

    – Ezio
    Dec 31 '18 at 10:01











  • What's the previous gradle version you were working with and what is the one you upgraded to?

    – tomerpacific
    Dec 31 '18 at 10:09











  • Previously it was 2.3.3 and now it is 3.2.1

    – Ezio
    Dec 31 '18 at 10:10











  • Have you gone over this? Don't know the intricacies of your project.

    – tomerpacific
    Dec 31 '18 at 10:18



















  • Can you post your gradle file?

    – tomerpacific
    Dec 31 '18 at 9:55











  • Done. This is the build.gradle of my base feature. I guess this is what you want.

    – Ezio
    Dec 31 '18 at 10:01











  • What's the previous gradle version you were working with and what is the one you upgraded to?

    – tomerpacific
    Dec 31 '18 at 10:09











  • Previously it was 2.3.3 and now it is 3.2.1

    – Ezio
    Dec 31 '18 at 10:10











  • Have you gone over this? Don't know the intricacies of your project.

    – tomerpacific
    Dec 31 '18 at 10:18

















Can you post your gradle file?

– tomerpacific
Dec 31 '18 at 9:55





Can you post your gradle file?

– tomerpacific
Dec 31 '18 at 9:55













Done. This is the build.gradle of my base feature. I guess this is what you want.

– Ezio
Dec 31 '18 at 10:01





Done. This is the build.gradle of my base feature. I guess this is what you want.

– Ezio
Dec 31 '18 at 10:01













What's the previous gradle version you were working with and what is the one you upgraded to?

– tomerpacific
Dec 31 '18 at 10:09





What's the previous gradle version you were working with and what is the one you upgraded to?

– tomerpacific
Dec 31 '18 at 10:09













Previously it was 2.3.3 and now it is 3.2.1

– Ezio
Dec 31 '18 at 10:10





Previously it was 2.3.3 and now it is 3.2.1

– Ezio
Dec 31 '18 at 10:10













Have you gone over this? Don't know the intricacies of your project.

– tomerpacific
Dec 31 '18 at 10:18





Have you gone over this? Don't know the intricacies of your project.

– tomerpacific
Dec 31 '18 at 10:18












2 Answers
2






active

oldest

votes


















0














Try:
File -> Invalidate caches/Restart and Invalidate and Restart






share|improve this answer
























  • Please read the question properly. I am getting this error while building my code via build command.

    – Ezio
    Dec 31 '18 at 11:27



















0














I was finally able to fix it. The issue was I have made one module as library and not added it in my base module. All your feature modules MUST be added as a dependency in your play module.






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%2f53986028%2faapt-error-in-android-studio-while-building-the-project%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Try:
    File -> Invalidate caches/Restart and Invalidate and Restart






    share|improve this answer
























    • Please read the question properly. I am getting this error while building my code via build command.

      – Ezio
      Dec 31 '18 at 11:27
















    0














    Try:
    File -> Invalidate caches/Restart and Invalidate and Restart






    share|improve this answer
























    • Please read the question properly. I am getting this error while building my code via build command.

      – Ezio
      Dec 31 '18 at 11:27














    0












    0








    0







    Try:
    File -> Invalidate caches/Restart and Invalidate and Restart






    share|improve this answer













    Try:
    File -> Invalidate caches/Restart and Invalidate and Restart







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Dec 31 '18 at 11:21









    aashutosh Poudelaashutosh Poudel

    365




    365













    • Please read the question properly. I am getting this error while building my code via build command.

      – Ezio
      Dec 31 '18 at 11:27



















    • Please read the question properly. I am getting this error while building my code via build command.

      – Ezio
      Dec 31 '18 at 11:27

















    Please read the question properly. I am getting this error while building my code via build command.

    – Ezio
    Dec 31 '18 at 11:27





    Please read the question properly. I am getting this error while building my code via build command.

    – Ezio
    Dec 31 '18 at 11:27













    0














    I was finally able to fix it. The issue was I have made one module as library and not added it in my base module. All your feature modules MUST be added as a dependency in your play module.






    share|improve this answer




























      0














      I was finally able to fix it. The issue was I have made one module as library and not added it in my base module. All your feature modules MUST be added as a dependency in your play module.






      share|improve this answer


























        0












        0








        0







        I was finally able to fix it. The issue was I have made one module as library and not added it in my base module. All your feature modules MUST be added as a dependency in your play module.






        share|improve this answer













        I was finally able to fix it. The issue was I have made one module as library and not added it in my base module. All your feature modules MUST be added as a dependency in your play module.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 3 at 13:50









        EzioEzio

        1,2111323




        1,2111323






























            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%2f53986028%2faapt-error-in-android-studio-while-building-the-project%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

            Monofisismo

            Angular Downloading a file using contenturl with Basic Authentication

            Olmecas