-
Notifications
You must be signed in to change notification settings - Fork 250
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
Can't use for some reason #85
Comments
Show your entire |
@jaredsburrows is correct; in your buildscript repositories you'll need to have at least one of |
But I did as the website said. This line:
should be in the project's gradle file, while the others should be in the other gradle file. Also, it there a better way to show the number of method&fields in Android-Studio? I got this output in the end: It seems a bit odd. Is this how many methods a totally new project take? |
What dependencies do you have?
|
Default ones when creating a new project, as this is what I wrote... :) |
@benjamin-bader Alright. Well, I guess you can close this now. |
Why ? I still haven't tested it well at the office |
@AndroidDeveloperLB The error you posted shows that, at build time, the buildscript repository set doesn't include either My suggestion is to find the build.gradle file where you have a |
Also, I just realized that your follow-up comment shows method count output, meaning that at least some version of the plugin is running. Are you still seeing problems related to dexcount? And yes, that initial method count is totally realistic. Projects are not Proguarded by default, and so you probably have the full Android SDK and one or more support libraries (not to mention Crashlytics) all contributing their full bulk. If you enabled Proguard you would see a much smaller number. As of this moment, building via the command line is the best and most direct way to see dexcount output. You can also see it in Android Studio when building; check the Messages or Gradle Console windows. |
@AndroidDeveloperLB Have you had a chance to test and see if your issue is resolved? |
Closing this out due to a combo of what seems to be trivial user error and no response. If you continue seeing an issue, please re-open. |
@benjamin-bader What no response? I wrote "I can do only in about 7 days or so" . |
My mistake; I missed that. |
ok, I've tested it at the office, and it took 26 minutes to re-build :( Error:(16, 1) A problem occurred evaluating project ':app'.
Since it takes so much time to build and I'm tight on schedule, I will try it out again later. |
Looks like a typo in the plugin id. |
it was copy-paste. |
It's a trap! This conversation is so strange, just post your |
Why a trap? And of what? |
@AndroidDeveloperLB I was joking. I fully understand, just "anonymize" your |
It's a lot of files, and are quite complex. Plus for this I prefer to send via email. Please. |
Your most root
Any
This is from my example https://github.com/jaredsburrows/android-gradle-java-app-template/blob/master/build.gradle. |
Can't I have the "dex count" applied on all gradle files, without really write it in each? Also, I've done as you wrote. Syncing (and also "make project") didn't show anything of the methods count in the messages window. In addition, it showed something weird: Total methods in ...apk: 103995 (158.69% used) What's with the >100% ? Also, the apk file that it has checked is one of the "flavors" of the app, which we usually don't use (it tested a "lite" version of it, instead of the normal one). |
I think theoretically you could apply the plugin within The percentage is weird, but I can see it happening (I haven't capped it at 100%). I'm aware of a few reasons that will cause it. It will happen if you are Multidexing, and also if you are using Instant Run. Placement of the output isn't guaranteed to be at the end of the output - it comes right after the If you aren't using proguard or multidex or instant run, then I'm not sure what would be giving you these large (over 65k) method counts. As you say, your build is complex; if you have any insight into what might be happening (and are not multidexing or instant-running), I'd appreciate hearing about it. I'm glad to see that the plugin is now at least running for you. |
Agreed that the flavor behavior is odd. We examine each distinct variant, but I'm not sure that that will account for all flavors. |
The code has multidex, because it has a lot of libraries to handle. instant-run is enabled, but it doesn't help at all (even though Google praises it all the time). |
OK, then that explains it. You have > 100% of the 65K method limit because you actually do have over 65K methods :) Glad to see that things are working. I'll open a separate issue to investigate flavors; this one has gotten quite long and non-specific. Thanks for bringing it to my attention! |
Is it possible though, to show the situation of all libraries, and be able to see it without really to try to find it in all of the long output ? |
Yes, apply the plugin to each project you want counted. You need to at least |
but is there an easier&faster way to do it, and avoid the need to search for the results in the huge amount of output? |
No; this sounds like something you'll need to address in your own build. There are other projects out there that will count independently of your build process, including one linked in this project's README. |
I don't see other projects being mentioned, but I've found this cool tool, which does it too (though its main use is for automatic UI performance measurement ) : http://blog.nimbledroid.com/2016/04/25/problems-with-libraries-and-sdks.html Anyway, thank you for the help. |
I get this error:
Error:Could not find com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.5.0.
Searched in the following locations:
file:/C:/Program Files/Android/android-studio/gradle/m2repository/com/getkeepsafe/dexcount/dexcount-gradle-plugin/0.5.0/dexcount-gradle-plugin-0.5.0.pom
file:/C:/Program Files/Android/android-studio/gradle/m2repository/com/getkeepsafe/dexcount/dexcount-gradle-plugin/0.5.0/dexcount-gradle-plugin-0.5.0.jar
https://maven.fabric.io/public/com/getkeepsafe/dexcount/dexcount-gradle-plugin/0.5.0/dexcount-gradle-plugin-0.5.0.pom
https://maven.fabric.io/public/com/getkeepsafe/dexcount/dexcount-gradle-plugin/0.5.0/dexcount-gradle-plugin-0.5.0.jar
The text was updated successfully, but these errors were encountered: