Why dagger requires to provide entities where I don't want to provide them?












2















I have two modules - core and auth. In auth module I am trying to integrate Google Sign In to Firebase. All dependencies resolving correctly, but not a GoogleSignInClient. I don't want use dagger for this entity to provide this client somewhere. I want to use it only in this class. But dagger shows me an error :



  class file for com.google.android.gms.auth.api.signin.GoogleSignInClient not found
Consult the following stack trace for details.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for com.google.android.gms.auth.api.signin.GoogleSignInClient not found
e: D:Projects<project path>buildtmpkapt3stubsinternalProductionDebug<class path>dicomponentsAppComponent.java: error:
[ComponentProcessor:MiscError] dagger.internal.codegen.ComponentProcessor was unable to process this interface because not all of its dependencies could be resolved. Check for compilation errors or a circular dependency with generated code.









share|improve this question























  • If you're sure to not require the client as a dependency, this might be an issue with some Gradle and Kapt caches.

    – tynn
    Nov 16 '18 at 8:15











  • Could you post code of dagger components? Please, check that GoogleSignInClient is not used in constructors, method parameters or fileds declaration marked with @Inject annotation.

    – ConstOrVar
    Nov 16 '18 at 8:35











  • @tynn do we have any workarounds for this case?

    – Sergey Shustikov
    Nov 16 '18 at 8:41











  • Sometimes it was sufficient to kill the Gradle deamon. Once I removed everything related to Gradle and Android Studio from the computer. You'd have to figure out where and why it's used.

    – tynn
    Nov 16 '18 at 9:16
















2















I have two modules - core and auth. In auth module I am trying to integrate Google Sign In to Firebase. All dependencies resolving correctly, but not a GoogleSignInClient. I don't want use dagger for this entity to provide this client somewhere. I want to use it only in this class. But dagger shows me an error :



  class file for com.google.android.gms.auth.api.signin.GoogleSignInClient not found
Consult the following stack trace for details.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for com.google.android.gms.auth.api.signin.GoogleSignInClient not found
e: D:Projects<project path>buildtmpkapt3stubsinternalProductionDebug<class path>dicomponentsAppComponent.java: error:
[ComponentProcessor:MiscError] dagger.internal.codegen.ComponentProcessor was unable to process this interface because not all of its dependencies could be resolved. Check for compilation errors or a circular dependency with generated code.









share|improve this question























  • If you're sure to not require the client as a dependency, this might be an issue with some Gradle and Kapt caches.

    – tynn
    Nov 16 '18 at 8:15











  • Could you post code of dagger components? Please, check that GoogleSignInClient is not used in constructors, method parameters or fileds declaration marked with @Inject annotation.

    – ConstOrVar
    Nov 16 '18 at 8:35











  • @tynn do we have any workarounds for this case?

    – Sergey Shustikov
    Nov 16 '18 at 8:41











  • Sometimes it was sufficient to kill the Gradle deamon. Once I removed everything related to Gradle and Android Studio from the computer. You'd have to figure out where and why it's used.

    – tynn
    Nov 16 '18 at 9:16














2












2








2








I have two modules - core and auth. In auth module I am trying to integrate Google Sign In to Firebase. All dependencies resolving correctly, but not a GoogleSignInClient. I don't want use dagger for this entity to provide this client somewhere. I want to use it only in this class. But dagger shows me an error :



  class file for com.google.android.gms.auth.api.signin.GoogleSignInClient not found
Consult the following stack trace for details.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for com.google.android.gms.auth.api.signin.GoogleSignInClient not found
e: D:Projects<project path>buildtmpkapt3stubsinternalProductionDebug<class path>dicomponentsAppComponent.java: error:
[ComponentProcessor:MiscError] dagger.internal.codegen.ComponentProcessor was unable to process this interface because not all of its dependencies could be resolved. Check for compilation errors or a circular dependency with generated code.









share|improve this question














I have two modules - core and auth. In auth module I am trying to integrate Google Sign In to Firebase. All dependencies resolving correctly, but not a GoogleSignInClient. I don't want use dagger for this entity to provide this client somewhere. I want to use it only in this class. But dagger shows me an error :



  class file for com.google.android.gms.auth.api.signin.GoogleSignInClient not found
Consult the following stack trace for details.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for com.google.android.gms.auth.api.signin.GoogleSignInClient not found
e: D:Projects<project path>buildtmpkapt3stubsinternalProductionDebug<class path>dicomponentsAppComponent.java: error:
[ComponentProcessor:MiscError] dagger.internal.codegen.ComponentProcessor was unable to process this interface because not all of its dependencies could be resolved. Check for compilation errors or a circular dependency with generated code.






kotlin dagger






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 16 '18 at 8:07









Sergey ShustikovSergey Shustikov

8,92664188




8,92664188













  • If you're sure to not require the client as a dependency, this might be an issue with some Gradle and Kapt caches.

    – tynn
    Nov 16 '18 at 8:15











  • Could you post code of dagger components? Please, check that GoogleSignInClient is not used in constructors, method parameters or fileds declaration marked with @Inject annotation.

    – ConstOrVar
    Nov 16 '18 at 8:35











  • @tynn do we have any workarounds for this case?

    – Sergey Shustikov
    Nov 16 '18 at 8:41











  • Sometimes it was sufficient to kill the Gradle deamon. Once I removed everything related to Gradle and Android Studio from the computer. You'd have to figure out where and why it's used.

    – tynn
    Nov 16 '18 at 9:16



















  • If you're sure to not require the client as a dependency, this might be an issue with some Gradle and Kapt caches.

    – tynn
    Nov 16 '18 at 8:15











  • Could you post code of dagger components? Please, check that GoogleSignInClient is not used in constructors, method parameters or fileds declaration marked with @Inject annotation.

    – ConstOrVar
    Nov 16 '18 at 8:35











  • @tynn do we have any workarounds for this case?

    – Sergey Shustikov
    Nov 16 '18 at 8:41











  • Sometimes it was sufficient to kill the Gradle deamon. Once I removed everything related to Gradle and Android Studio from the computer. You'd have to figure out where and why it's used.

    – tynn
    Nov 16 '18 at 9:16

















If you're sure to not require the client as a dependency, this might be an issue with some Gradle and Kapt caches.

– tynn
Nov 16 '18 at 8:15





If you're sure to not require the client as a dependency, this might be an issue with some Gradle and Kapt caches.

– tynn
Nov 16 '18 at 8:15













Could you post code of dagger components? Please, check that GoogleSignInClient is not used in constructors, method parameters or fileds declaration marked with @Inject annotation.

– ConstOrVar
Nov 16 '18 at 8:35





Could you post code of dagger components? Please, check that GoogleSignInClient is not used in constructors, method parameters or fileds declaration marked with @Inject annotation.

– ConstOrVar
Nov 16 '18 at 8:35













@tynn do we have any workarounds for this case?

– Sergey Shustikov
Nov 16 '18 at 8:41





@tynn do we have any workarounds for this case?

– Sergey Shustikov
Nov 16 '18 at 8:41













Sometimes it was sufficient to kill the Gradle deamon. Once I removed everything related to Gradle and Android Studio from the computer. You'd have to figure out where and why it's used.

– tynn
Nov 16 '18 at 9:16





Sometimes it was sufficient to kill the Gradle deamon. Once I removed everything related to Gradle and Android Studio from the computer. You'd have to figure out where and why it's used.

– tynn
Nov 16 '18 at 9:16












1 Answer
1






active

oldest

votes


















1














Unfortunately it wasn't dagger problem. It happens with using several Android modules when you use api and implementation in gradle incorrectly.



I don't know why, but when I fixed my dependencies in Gradle - all become working.






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%2f53333767%2fwhy-dagger-requires-to-provide-entities-where-i-dont-want-to-provide-them%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














    Unfortunately it wasn't dagger problem. It happens with using several Android modules when you use api and implementation in gradle incorrectly.



    I don't know why, but when I fixed my dependencies in Gradle - all become working.






    share|improve this answer




























      1














      Unfortunately it wasn't dagger problem. It happens with using several Android modules when you use api and implementation in gradle incorrectly.



      I don't know why, but when I fixed my dependencies in Gradle - all become working.






      share|improve this answer


























        1












        1








        1







        Unfortunately it wasn't dagger problem. It happens with using several Android modules when you use api and implementation in gradle incorrectly.



        I don't know why, but when I fixed my dependencies in Gradle - all become working.






        share|improve this answer













        Unfortunately it wasn't dagger problem. It happens with using several Android modules when you use api and implementation in gradle incorrectly.



        I don't know why, but when I fixed my dependencies in Gradle - all become working.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 16 '18 at 10:57









        Sergey ShustikovSergey Shustikov

        8,92664188




        8,92664188
































            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%2f53333767%2fwhy-dagger-requires-to-provide-entities-where-i-dont-want-to-provide-them%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

            Xamarin.iOS Cant Deploy on Iphone

            Glorious Revolution

            Dulmage-Mendelsohn matrix decomposition in Python