Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library leakcanary-android-1.3 is not in list of external libraries #9

Closed
zaur opened this issue May 9, 2015 · 40 comments
Closed

Library leakcanary-android-1.3 is not in list of external libraries #9

zaur opened this issue May 9, 2015 · 40 comments

Comments

@zaur
Copy link

zaur commented May 9, 2015

I have a project with lots of dependencies.
When I add

 dependencies {
   debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3'
   releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3'
 }

to main build.gradle, leakcanary-android is not in list of external libraries after gradle sync, although leakcanary-analyzer and leakcanary-watcher are there.
See screenshot:
screen shot 2015-05-09 at 18 59 23

On a blank project however everything works fine:
screen shot 2015-05-09 at 18 59 09

@pyricau
Copy link
Member

pyricau commented May 9, 2015

That's really strange, leakcanary-analyzer is a transitive dependency of leakcanary-android.

Can you paste the dependency tree here? ./gradlew :YOUR_GRADLE_MODULE:dependencies

@pyricau
Copy link
Member

pyricau commented May 9, 2015

Also:

  • Is the LeakCanary class available in the classpath? Can you write debug code that uses it?
  • Do you have more build types than just debug and release ?

@zaur
Copy link
Author

zaur commented May 9, 2015

LeakCanary is not available, but LeakTrace and LeakTraceElement are available.
I don't have any custom build types.
Gradle version 2.2.1
Android plugin version 1.2.3
Android studio version 1.2.1.1

Here is dependency tree:

:app:dependencies

------------------------------------------------------------
Project :app - Injects the build id used by the Fabric SDK.
------------------------------------------------------------

_debugAndroidTestApk - ## Internal use, do not manually configure ##
No dependencies

_debugAndroidTestCompile - ## Internal use, do not manually configure ##
No dependencies

_debugApk - ## Internal use, do not manually configure ##
+--- com.android.support:appcompat-v7:22.1.1
|    \--- com.android.support:support-v4:22.1.1
|         \--- com.android.support:support-annotations:22.1.1
+--- com.crashlytics.sdk.android:crashlytics:2.2.3
|    +--- com.crashlytics.sdk.android:answers:1.1.2
|    |    \--- io.fabric.sdk.android:fabric:1.2.0 -> 1.3.0
|    +--- io.fabric.sdk.android:fabric:1.3.0
|    \--- com.crashlytics.sdk.android:beta:1.1.2
|         \--- io.fabric.sdk.android:fabric:1.2.0 -> 1.3.0
+--- com.jakewharton:butterknife:6.1.0
+--- com.squareup.okhttp:okhttp:2.2.0
|    \--- com.squareup.okio:okio:1.2.0
+--- org.immutables:gson:1.1.3
|    \--- com.google.code.gson:gson:2.3.1
+--- com.squareup.picasso:picasso:2.5.0
+--- com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1
+--- de.greenrobot:eventbus:2.4.0
+--- com.github.chrisbanes.photoview:library:1.2.3
|    \--- com.android.support:support-v4:19.+ -> 22.1.1 (*)
+--- com.twitter:twitter-text:1.6.1
|    \--- org.yaml:snakeyaml:1.12
+--- project :innbxtextview
|    \--- com.android.support:appcompat-v7:22.1.1 (*)
+--- project :SwipeCards
+--- project :viewpagerindicator
|    \--- com.android.support:support-v4:22.1.1 (*)
+--- project :PagerStrip
|    +--- com.android.support:support-v4:22.1.1 (*)
|    \--- project :innbxtextview (*)
+--- project :fab
|    \--- com.android.support:support-annotations:22.1.1
+--- project :slidingup
|    +--- com.android.support:support-v4:22.1.1 (*)
|    \--- com.nineoldandroids:library:2.4.0
\--- com.squareup.leakcanary:leakcanary-android:1.3
     \--- com.squareup.leakcanary:leakcanary-analyzer:1.3
          +--- com.squareup.haha:haha:1.1
          \--- com.squareup.leakcanary:leakcanary-watcher:1.3

_debugCompile - ## Internal use, do not manually configure ##
+--- com.android.support:appcompat-v7:22.1.1
|    \--- com.android.support:support-v4:22.1.1
|         \--- com.android.support:support-annotations:22.1.1
+--- com.crashlytics.sdk.android:crashlytics:2.2.3
|    +--- com.crashlytics.sdk.android:answers:1.1.2
|    |    \--- io.fabric.sdk.android:fabric:1.2.0 -> 1.3.0
|    +--- io.fabric.sdk.android:fabric:1.3.0
|    \--- com.crashlytics.sdk.android:beta:1.1.2
|         \--- io.fabric.sdk.android:fabric:1.2.0 -> 1.3.0
+--- com.jakewharton:butterknife:6.1.0
+--- com.squareup.okhttp:okhttp:2.2.0
|    \--- com.squareup.okio:okio:1.2.0
+--- org.immutables:gson:1.1.3
|    \--- com.google.code.gson:gson:2.3.1
+--- com.squareup.picasso:picasso:2.5.0
+--- com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1
+--- de.greenrobot:eventbus:2.4.0
+--- com.github.chrisbanes.photoview:library:1.2.3
|    \--- com.android.support:support-v4:19.+ -> 22.1.1 (*)
+--- com.twitter:twitter-text:1.6.1
|    \--- org.yaml:snakeyaml:1.12
+--- project :innbxtextview
|    \--- com.android.support:appcompat-v7:22.1.1 (*)
+--- project :SwipeCards
+--- project :viewpagerindicator
|    \--- com.android.support:support-v4:22.1.1 (*)
+--- project :PagerStrip
|    +--- com.android.support:support-v4:22.1.1 (*)
|    \--- project :innbxtextview (*)
+--- project :fab
|    \--- com.android.support:support-annotations:22.1.1
+--- project :slidingup
|    +--- com.android.support:support-v4:22.1.1 (*)
|    \--- com.nineoldandroids:library:2.4.0
\--- com.squareup.leakcanary:leakcanary-android:1.3
     \--- com.squareup.leakcanary:leakcanary-analyzer:1.3
          +--- com.squareup.haha:haha:1.1
          \--- com.squareup.leakcanary:leakcanary-watcher:1.3

_debugUnitTestApk - ## Internal use, do not manually configure ##
No dependencies

_debugUnitTestCompile - ## Internal use, do not manually configure ##
No dependencies

_releaseApk - ## Internal use, do not manually configure ##
+--- com.android.support:appcompat-v7:22.1.1
|    \--- com.android.support:support-v4:22.1.1
|         \--- com.android.support:support-annotations:22.1.1
+--- com.crashlytics.sdk.android:crashlytics:2.2.3
|    +--- com.crashlytics.sdk.android:answers:1.1.2
|    |    \--- io.fabric.sdk.android:fabric:1.2.0 -> 1.3.0
|    +--- io.fabric.sdk.android:fabric:1.3.0
|    \--- com.crashlytics.sdk.android:beta:1.1.2
|         \--- io.fabric.sdk.android:fabric:1.2.0 -> 1.3.0
+--- com.jakewharton:butterknife:6.1.0
+--- com.squareup.okhttp:okhttp:2.2.0
|    \--- com.squareup.okio:okio:1.2.0
+--- org.immutables:gson:1.1.3
|    \--- com.google.code.gson:gson:2.3.1
+--- com.squareup.picasso:picasso:2.5.0
+--- com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1
+--- de.greenrobot:eventbus:2.4.0
+--- com.github.chrisbanes.photoview:library:1.2.3
|    \--- com.android.support:support-v4:19.+ -> 22.1.1 (*)
+--- com.twitter:twitter-text:1.6.1
|    \--- org.yaml:snakeyaml:1.12
+--- project :innbxtextview
|    \--- com.android.support:appcompat-v7:22.1.1 (*)
+--- project :SwipeCards
+--- project :viewpagerindicator
|    \--- com.android.support:support-v4:22.1.1 (*)
+--- project :PagerStrip
|    +--- com.android.support:support-v4:22.1.1 (*)
|    \--- project :innbxtextview (*)
+--- project :fab
|    \--- com.android.support:support-annotations:22.1.1
+--- project :slidingup
|    +--- com.android.support:support-v4:22.1.1 (*)
|    \--- com.nineoldandroids:library:2.4.0
\--- com.squareup.leakcanary:leakcanary-android-no-op:1.3
     \--- com.squareup.leakcanary:leakcanary-watcher:1.3

_releaseCompile - ## Internal use, do not manually configure ##
+--- com.android.support:appcompat-v7:22.1.1
|    \--- com.android.support:support-v4:22.1.1
|         \--- com.android.support:support-annotations:22.1.1
+--- com.crashlytics.sdk.android:crashlytics:2.2.3
|    +--- com.crashlytics.sdk.android:answers:1.1.2
|    |    \--- io.fabric.sdk.android:fabric:1.2.0 -> 1.3.0
|    +--- io.fabric.sdk.android:fabric:1.3.0
|    \--- com.crashlytics.sdk.android:beta:1.1.2
|         \--- io.fabric.sdk.android:fabric:1.2.0 -> 1.3.0
+--- com.jakewharton:butterknife:6.1.0
+--- com.squareup.okhttp:okhttp:2.2.0
|    \--- com.squareup.okio:okio:1.2.0
+--- org.immutables:gson:1.1.3
|    \--- com.google.code.gson:gson:2.3.1
+--- com.squareup.picasso:picasso:2.5.0
+--- com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1
+--- de.greenrobot:eventbus:2.4.0
+--- com.github.chrisbanes.photoview:library:1.2.3
|    \--- com.android.support:support-v4:19.+ -> 22.1.1 (*)
+--- com.twitter:twitter-text:1.6.1
|    \--- org.yaml:snakeyaml:1.12
+--- project :innbxtextview
|    \--- com.android.support:appcompat-v7:22.1.1 (*)
+--- project :SwipeCards
+--- project :viewpagerindicator
|    \--- com.android.support:support-v4:22.1.1 (*)
+--- project :PagerStrip
|    +--- com.android.support:support-v4:22.1.1 (*)
|    \--- project :innbxtextview (*)
+--- project :fab
|    \--- com.android.support:support-annotations:22.1.1
+--- project :slidingup
|    +--- com.android.support:support-v4:22.1.1 (*)
|    \--- com.nineoldandroids:library:2.4.0
\--- com.squareup.leakcanary:leakcanary-android-no-op:1.3
     \--- com.squareup.leakcanary:leakcanary-watcher:1.3

_releaseUnitTestApk - ## Internal use, do not manually configure ##
No dependencies

_releaseUnitTestCompile - ## Internal use, do not manually configure ##
No dependencies

androidJacocoAgent - The Jacoco agent to use to get coverage data.
\--- org.jacoco:org.jacoco.agent:0.7.4.201502262128

androidJacocoAnt - The Jacoco ant tasks to use to get execute Gradle tasks.
\--- org.jacoco:org.jacoco.ant:0.7.4.201502262128
     +--- org.jacoco:org.jacoco.core:0.7.4.201502262128
     |    \--- org.ow2.asm:asm-debug-all:5.0.1
     +--- org.jacoco:org.jacoco.report:0.7.4.201502262128
     |    +--- org.jacoco:org.jacoco.core:0.7.4.201502262128 (*)
     |    \--- org.ow2.asm:asm-debug-all:5.0.1
     \--- org.jacoco:org.jacoco.agent:0.7.4.201502262128

androidTestApk - Classpath packaged with the compiled 'androidTest' classes.
No dependencies

androidTestCompile - Classpath for compiling the androidTest sources.
No dependencies

androidTestProvided - Classpath for only compiling the androidTest sources.
No dependencies

androidTestWearApp - Link to a wear app to embed for object 'androidTest'.
No dependencies

apk - Classpath packaged with the compiled 'main' classes.
No dependencies

archives - Configuration for archive artifacts.
No dependencies

compile - Classpath for compiling the main sources.
+--- com.android.support:appcompat-v7:22.1.1
|    \--- com.android.support:support-v4:22.1.1
|         \--- com.android.support:support-annotations:22.1.1
+--- com.crashlytics.sdk.android:crashlytics:2.2.3
|    +--- com.crashlytics.sdk.android:answers:1.1.2
|    |    \--- io.fabric.sdk.android:fabric:1.2.0 -> 1.3.0
|    +--- io.fabric.sdk.android:fabric:1.3.0
|    \--- com.crashlytics.sdk.android:beta:1.1.2
|         \--- io.fabric.sdk.android:fabric:1.2.0 -> 1.3.0
+--- com.jakewharton:butterknife:6.1.0
+--- com.squareup.okhttp:okhttp:2.2.0
|    \--- com.squareup.okio:okio:1.2.0
+--- org.immutables:gson:1.1.3
|    \--- com.google.code.gson:gson:2.3.1
+--- com.squareup.picasso:picasso:2.5.0
+--- com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1
+--- de.greenrobot:eventbus:2.4.0
+--- com.github.chrisbanes.photoview:library:1.2.3
|    \--- com.android.support:support-v4:19.+ -> 22.1.1 (*)
+--- com.twitter:twitter-text:1.6.1
|    \--- org.yaml:snakeyaml:1.12
+--- project :innbxtextview
|    \--- com.android.support:appcompat-v7:22.1.1 (*)
+--- project :SwipeCards
+--- project :viewpagerindicator
|    \--- com.android.support:support-v4:22.1.1 (*)
+--- project :PagerStrip
|    +--- com.android.support:support-v4:22.1.1 (*)
|    \--- project :innbxtextview (*)
+--- project :fab
|    \--- com.android.support:support-annotations:22.1.1
\--- project :slidingup
     +--- com.android.support:support-v4:22.1.1 (*)
     \--- com.nineoldandroids:library:2.4.0

debugApk - Classpath packaged with the compiled 'debug' classes.
No dependencies

debugCompile - Classpath for compiling the debug sources.
\--- com.squareup.leakcanary:leakcanary-android:1.3
     \--- com.squareup.leakcanary:leakcanary-analyzer:1.3
          +--- com.squareup.haha:haha:1.1
          \--- com.squareup.leakcanary:leakcanary-watcher:1.3

debugProvided - Classpath for only compiling the debug sources.
No dependencies

debugWearApp - Link to a wear app to embed for object 'debug'.
No dependencies

default - Configuration for default artifacts.
No dependencies

default-mapping - Configuration for default mapping artifacts.
No dependencies

io.fabric - fabric and its transitive dependencies.
No dependencies

provided - Classpath for only compiling the main sources.
No dependencies

releaseApk - Classpath packaged with the compiled 'release' classes.
No dependencies

releaseCompile - Classpath for compiling the release sources.
\--- com.squareup.leakcanary:leakcanary-android-no-op:1.3
     \--- com.squareup.leakcanary:leakcanary-watcher:1.3

releaseProvided - Classpath for only compiling the release sources.
No dependencies

releaseWearApp - Link to a wear app to embed for object 'release'.
No dependencies

testApk - Classpath packaged with the compiled 'test' classes.
No dependencies

testCompile - Classpath for compiling the test sources.
No dependencies

testDebugApk - Classpath packaged with the compiled 'testDebug' classes.
No dependencies

testDebugCompile - Classpath for compiling the testDebug sources.
No dependencies

testDebugProvided - Classpath for only compiling the testDebug sources.
No dependencies

testDebugWearApp - Link to a wear app to embed for object 'testDebug'.
No dependencies

testProvided - Classpath for only compiling the test sources.
No dependencies

testReleaseApk - Classpath packaged with the compiled 'testRelease' classes.
No dependencies

testReleaseCompile - Classpath for compiling the testRelease sources.
No dependencies

testReleaseProvided - Classpath for only compiling the testRelease sources.
No dependencies

testReleaseWearApp - Link to a wear app to embed for object 'testRelease'.
No dependencies

testWearApp - Link to a wear app to embed for object 'test'.
No dependencies

wearApp - Link to a wear app to embed for object 'main'.
No dependencies

BUILD SUCCESSFUL

Total time: 4.434 secs

@zaur
Copy link
Author

zaur commented May 9, 2015

update: after performing Build->Clean Project it finally appeared :)

@pyricau
Copy link
Member

pyricau commented May 9, 2015

Alright, that's weird. Well, let's close then.

@pyricau pyricau closed this as completed May 9, 2015
@kaushikgopal
Copy link

interesting, i'm noticing this same issue with one of my projects. as is someone else on SO :P http://stackoverflow.com/questions/30158104/square-leakcanary-cannot-find-symbol. my guess was some gradle foo that was stripping it out. odd though that the analyzer and watcher dependencies show up.

Oddly, just as i looked at this and ran a Build > Clean Project, it started appearing again. I could have sworn this didn't work before. oh well... i did try it out at 2am in the morning. that could have been the problem. though, i'm curious to know what about the dependencies got the project to that state.

@kaushikgopal
Copy link

arr. actually i was looking at a different project ><. still running into the issue where leakcanary-android dependency not showing up.

@pyricau
Copy link
Member

pyricau commented May 11, 2015

Are you sure you are not using another variant than debug or release?

@nbcklim
Copy link

nbcklim commented May 11, 2015

Same issue as Kaushik and other people on S.O.

@kaushikgopal
Copy link

Here's the setup for that project (where i'm noticing the issue):

List of Variants in the project:

  • debug
  • release
  • debugTest

Gradle version 2.1
Android plugin version 1.0.0
Android studio version 1.2.1.1

I notice that the gradle version(s) on this project are super old. Not sure if that's causing any issues (i'm a complete groovy/gradle newb so can't tell).

Another thing i notice that's a little different about this project is that i use multiple independent java subProjects (but doubt that should have to do with anything).

After doing a clean project build, i only notice the watcher and analyzer as seen below:

screen shot 2015-05-11 at 10 20 31 am

@eikaramba
Copy link

just wanted to say that i had the same problem. No matter what i do, no om.squareup.leakcanary.LeakCanary available, but after i cleaned the project in the build menu in Android Studio, it worked.

@kaushikgopal
Copy link

@eikaramba can you post the specifics (as i did in a previous comment) of your environment and project. that might help fish out the problem. i (and some other folks on SO) tried the Build->Clean Project and it didn't work.

i'm beginning to think this is a gradle versioning problem possibly :S but upping the version doesn't seem like a 10 minute task for my current project; so having more details would be helpful before i embark on alternative routes (especially given that the build > clean solution is not working for everyone).

@eikaramba
Copy link

sure,

List of Variants in the project:

debug
release

Gradle version 2.4
Android plugin version (where do i see that? com.android.tools.build:gradle:1.2.3?)
Android studio version 1.2.1.1

@RobertoAlvarezCeballos
Copy link

I've tried everything (I think) but still no luck. I've clean the project many times but that has no effect.

@pyricau
Copy link
Member

pyricau commented May 12, 2015

@RobertoIDL Can you provide the gradle version + android plug version + android studio version?

@RobertoAlvarezCeballos
Copy link

@pyricau Sure!

Gradle version: 2.2.1
Android plugin version: com.android.tools.build:gradle:1.2.3
Android Studio: 1.2.1

@timrau
Copy link

timrau commented May 12, 2015

I just encountered the same issue. Finally I solved it by adding

repositories {
    mavenCentral()
}

Before the dependencies { ... } section of my build.gradle.

@kaushikgopal
Copy link

@timrau just tried that solution and didn't work. sure it was not a red herring for another issue? ( i already had mavenCentral declared in the repositories section. tried removing other declarations to see if there was any conflict etc. didn't seem to have an effect)

@timrau
Copy link

timrau commented May 13, 2015

@kaushikgopal I'm not pretty sure indeed.

@pyricau
Copy link
Member

pyricau commented May 13, 2015

@kaushikgopal @RobertoIDL what error do you get when building from the command line?

@kaushikgopal
Copy link

So the thing is, there's no "error" per say. it's just that the dependencies aren't getting pulled down properly.

I realize i haven't clearly explained the issue anywhere. so i'll paste down my steps in detail here:

  1. I check installation instructions from the README.md

  2. I diligently paste below lines in the dependencies block of my app's build.gradle

    debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3'
    releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3'
    
  3. i clean and build the project. no errors! all good.

  4. i open up my custom App class, and try to paste the below line

    LeakCanary.install(this);

  5. Android Studio can't find LeakCanary anywhere.

  6. So i think to myself that's super strange, i could have sworn i saw a leakcanary package from square being pulled down. I check to see the external libs pulled down and notice only leakcanary-analyzer-1.3 and leakcanary-watcher-1.3 but NO leakcanary-android-1.3 (as shown in both my screenshot and @zaur 's first screenshot)

It's crazy cause on multiple greenfield projects that i've tried, everything gets pulled down without any issues. There's some setting or instruction that's "conflicting" with the existing project, that's preventing the leakcanary-android-1.3 jar alone from being pulled down. That's the part i can't seem to understand as i think there's probably some funkiness with groovy/gradle?

(if that's not the info you're looking for, do let me know and i'll add in more details).

@mvarnagiris
Copy link

I had this problem as well. What did solve the problem is the end was removing this from gradle:

configurations.all {
    transitive = false
}

@kaushikgopal
Copy link

hey @mvarnagiris ; would it be possible for you to change transitive = true and reproduce the same problem as mentioned in this thread?

for what it's worth, i don't have that setting in my gradle file :S (would be interesting to check the default).

@mvarnagiris
Copy link

With transitive = true it works fine. The problem is when I set transitive = false. I can reproduce this. Although it might be different issue. I get leakcanary-android-1.3 in my External Libraries list, but not other, so I get RefWatcher is missing error.

@pyricau
Copy link
Member

pyricau commented May 14, 2015

Yep that's the opposite error.

@kaushikgopal what's the output of ./gradlew :YOUR_MODULE:dependencies ?

@dodgex
Copy link

dodgex commented May 14, 2015

had this issue too. but for me Build > Clean Project fixed it. for now.

@kaushikgopal
Copy link

this is strange. I got it to work now:

  • I basically knocked off a bunch of dependencies from my build.gradle
  • AS then threw up with errors for the missing dependencies
  • i re-added the dependencies (in the exact same order without any change)
  • but i went to command line and did a gw clean assemble

i see leakcanary-android now ! #win.

I'm not sure how or what changed, probably the clean build from command line flushes out some cached config :S ? In any case solved for me. Thanks folks!

@RobertoIDL give a shot and clean build from command line (alternatively the unexplainable crazy procedure i just listed above) and see if it works for you.

@bytehala
Copy link

In my case, I had a custom buildType

buildTypes {
    bypass {
       // Some parameters
    }
}

I just had to use bypassCompile instead of debugCompile

@RobertoAlvarezCeballos
Copy link

Hi @kaushikgopal I've just tried but no luck.

I'll keep investigating tomorrow, this shouldn't be this difficult :)

At least you got it working.

@pyricau
Copy link
Member

pyricau commented May 14, 2015

Alright. Anyone else than @RobertoIDL still have that problem?

@kaushikgopal
Copy link

another observation: AS doesn't show the dependency sometimes, but that doesn't necessarily mean it's not there :). so try a clean build from command line and run the dependencies command to see if it's really not present.

@vovkab
Copy link

vovkab commented May 14, 2015

This happening because leakcanary-android is aar, and "External Libraries" only shows jar's.
You can find leakcanary in build/intermediates/exploded-aar/com.squareup.leakcanary/leakcanary-android

@kaushikgopal
Copy link

yup that makes sense. though previously (without the clean build command line dance) it was not available in the exploded-aar folder either (cause the class LeakCanary was not found at all).

@vovkab
Copy link

vovkab commented May 14, 2015

@kaushikgopal did you do gradle sync after you changed your gradle file? (Tools -> Android -> Sync project with Gradle Files)

@kaushikgopal
Copy link

yup i do remember doing that as well. usually AS is pretty annoying about
wanting to sync if you make any changes to the gradle file.

Kaushik

On Thu, May 14, 2015 at 3:28 PM, Vladimir Baryshnikov <
notifications@github.com> wrote:

@kaushikgopal https://github.com/kaushikgopal did you do gradle sync
after you changed your gradle file? (Tools -> Android -> Sync project with
Gradle Files)


Reply to this email directly or view it on GitHub
#9 (comment).

@RobertoAlvarezCeballos
Copy link

Hi all,

I got it working, not how I wanted but at least is working now. Let me explain the differences between my project and probably how everyone else is doing it.

I have my app module and then another module called libraries where I have all the libraries that are not gradle compatible or that I have developed for this particular project.

So my gradle settings file looks like this (I've changed some names):

include ':app'
include ':libraries:volley'
include ':libraries:barcodeLibrary'
include ':libraries:baseAndroidLibrary'
include ':libraries:coreLibrary'

I was trying to add the LeakCanary library to my baseAndroidLibrary and no matter what I try it doesn't work, I never get all the dependencies downloaded.

If instead I add the library to my app's gradle file after a simple clean project everything is there.

For the moment I will leave it as part of the app module as it's working but ideally I would like to have as part of my baseAndroidLibrary.

Thank you all for your help.

@pyricau
Copy link
Member

pyricau commented May 15, 2015

Alright. All problems fixed then. Looks like https://github.com/square/leakcanary#troubleshooting is all that's needed.

@pyricau pyricau closed this as completed May 15, 2015
pyricau added a commit that referenced this issue May 15, 2015
Yky pushed a commit to Yky/leakcanary that referenced this issue Feb 21, 2016
@Akash1034
Copy link

Hi all,
Can you help me in setting up leakCanary with my custom Build type , what all has to be done.

@jemshit
Copy link

jemshit commented Oct 24, 2017

If you have custom built type, add this too: customBuildTypeCompile 'com.squareup.leakcanary:leakcanary-android:x.x.x'

@SunmerCho
Copy link

SunmerCho commented Feb 9, 2018

i just change this the import : com.squareup.leakcanary.LeakCanary(cannot symbol class) to com.squareup.leakcanary.*;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests