Fixed
Status Update
Comments
do...@gmail.com <do...@gmail.com> #2
can you share your android studio version
xa...@android.com <xa...@android.com>
ph...@gmail.com <ph...@gmail.com> #3
Is this happening with Studio 3.0?
do...@gmail.com <do...@gmail.com> #4
Note: This worked for me on Windows 7 Pro 32-bit (with Android Studio 2.3.3). Seems like an issue with adt-branding module (which should contain the "/idea/AndroidStudioApplicationInfo.xml" resource).
ph...@gmail.com <ph...@gmail.com> #5
Hi, also happened on Mac Book Pro 15 retina mi-2015
MacOs Sierra 10.12.6
Android Studio 2.3.3
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
MacOs Sierra 10.12.6
Android Studio 2.3.3
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
ph...@gmail.com <ph...@gmail.com> #6
Thank you for this feedback. Your feedback helps make sure Android development tools are great! Given your issues has been resolved I am closing this issue.
xa...@android.com <xa...@android.com> #7
This is not currently possible with the way Gradle handle dependencies.
I talked to the engineers of gradleware and I think we have a come up with a solution that will require changes both in Gradle and our plugin. I'm hoping get can get this in Gradle 1.8
In the meantime there is no real workaround (that I'm aware of)
I talked to the engineers of gradleware and I think we have a come up with a solution that will require changes both in Gradle and our plugin. I'm hoping get can get this in Gradle 1.8
In the meantime there is no real workaround (that I'm aware of)
[Deleted User] <[Deleted User]> #9
I believe this is something that also prevents us from debugging and stepping into code on those library project dependencies. Which is not good, not good at all.
[Deleted User] <[Deleted User]> #10
I've just updated to Gradle 1.8 and this does not seem to be fixed... Do we need to do anything else on our part!?
dm...@gmail.com <dm...@gmail.com> #11
wierd issue, aar always uses release BuildConfig
sh...@gmail.com <sh...@gmail.com> #12
Gradle 1.9, Android plug-in 0.7.1
Issue still not fixed.
Directory ./build/exploded-bundles contains *.aar files in release mode.
But it should has two subdirectories with corresponding *.aar files:
./build/exploded-bundles/debug/
./build/exploded-bundles/release/
Issue still not fixed.
Directory ./build/exploded-bundles contains *.aar files in release mode.
But it should has two subdirectories with corresponding *.aar files:
./build/exploded-bundles/debug/
./build/exploded-bundles/release/
xa...@android.com <xa...@android.com> #13
This is not fixed yet, and we haven't announced that it was fixed, so this is expected.
As I mentioned a while ago, there is work to be done in Gradle itself, and this hasn't happened yet.
As I mentioned a while ago, there is work to be done in Gradle itself, and this hasn't happened yet.
sa...@gmail.com <sa...@gmail.com> #14
So basically this issue means that the new android gradle build system doesn't support android projects which depend on android libraries? I guess if we have android library projects we must continue using the ant build system?
xa...@android.com <xa...@android.com> #15
No. this means the library used by the project is always the release version of the library. This may or may not be a problem to you.
ne...@gmail.com <ne...@gmail.com> #16
Also with the buildConfigField option in gradle-plugin 0.8 it is not possible to replace the values as a workaround. To have it back in the libraries. can someone confirm this too?
pa...@gmail.com <pa...@gmail.com> #17
[Comment deleted]
ma...@gmail.com <ma...@gmail.com> #18
Of course having the library project always being the release version is a problem. For instance, Google Maps V1 which our product (been in the market 3 years) is still using. We have map views in Android Library projects, and the maps won't work in Debug mode because the map key being pulled is the release map key.
The WHOLE POINT of debug and release builds is to have debug/release overrides. satur9n above is correct really, when he says that the new android gradle build system doesn't support android projects which depend on android libraries. (since it doesn't distinguish properly between debug and release, it DOES NOT SUPPORT Android Libraries!).
We too MUST wait until this issue is fixed before we can migrate our developers to Android Studio, much as we would like to.
The WHOLE POINT of debug and release builds is to have debug/release overrides. satur9n above is correct really, when he says that the new android gradle build system doesn't support android projects which depend on android libraries. (since it doesn't distinguish properly between debug and release, it DOES NOT SUPPORT Android Libraries!).
We too MUST wait until this issue is fixed before we can migrate our developers to Android Studio, much as we would like to.
vi...@gmail.com <vi...@gmail.com> #19
I agree that this issue is a MAJOR one, and should be fixed quickly.
Workarounds are dangerous, and may lead to release unwanted code.
And by the way, it would be so perfect that buildTypes get propagated through other modules
Workarounds are dangerous, and may lead to release unwanted code.
And by the way, it would be so perfect that buildTypes get propagated through other modules
wo...@gmail.com <wo...@gmail.com> #20
Just wondering when this could be fixed as it's a BIG issue to us.
[Deleted User] <[Deleted User]> #21
[Comment deleted]
ja...@gmail.com <ja...@gmail.com> #22
I'm running Android Studio 0.5.8 and this is still an issue. Is there any chance we could get an update on when this might be released?
an...@gmail.com <an...@gmail.com> #23
[POSSIBLE SOLUTION (HOPEFULLY NOT A COMPLETE HACK)]
My configuration:
gradle 1.10
android gradle plugin 0.9.1
compileSdkVersion = 19
buildToolsVersion = "19.0.0"
There is not way to compile the application and the libraries along with it having different BuildConfig, however, it is possible to build the libraries separately and export them as android archives (.aars).
I included an Android project with two libraries and the gradle scripts with defined two flavours: one building the libraries along with the application at compile time and one giving to the application a reference to an external library where the libraries have been previously built and exported as aars.
P.S.
I had first to export the libraries as aars and then enable the flavour using them (i.e. uncommenting it).
My configuration:
gradle 1.10
android gradle plugin 0.9.1
compileSdkVersion = 19
buildToolsVersion = "19.0.0"
There is not way to compile the application and the libraries along with it having different BuildConfig, however, it is possible to build the libraries separately and export them as android archives (.aars).
I included an Android project with two libraries and the gradle scripts with defined two flavours: one building the libraries along with the application at compile time and one giving to the application a reference to an external library where the libraries have been previously built and exported as aars.
P.S.
I had first to export the libraries as aars and then enable the flavour using them (i.e. uncommenting it).
ma...@gmail.com <ma...@gmail.com> #24
Android Studio 0.6.1 still has no fix for this issue. This should be fixed before beta, since it is an intrinsic behavior of both Gradle and Android plugin. Both need design changes to make it work, I understand.
[Deleted User] <[Deleted User]> #25
Workaround: instaed of BuildConfig.DEBUG create another boolean variable at lib-project's e.g. BuildConfig.RELEASE and link it with application's buildType.
Details:https://gist.github.com/almozavr/d59e770d2a6386061fcb
Details:
ma...@gmail.com <ma...@gmail.com> #26
Valuable knowledge. Question: this workaround actually continues to use the release library doesn't it?
The difference is that we have made the release library into a debug library by virtue of switching the Java code to debug, as long as it uses the BuildConfig.RELEASE variable?
So actually, Android Gradle is still using the release AAR, but we don't care!
The difference is that we have made the release library into a debug library by virtue of switching the Java code to debug, as long as it uses the BuildConfig.RELEASE variable?
So actually, Android Gradle is still using the release AAR, but we don't care!
[Deleted User] <[Deleted User]> #27
Correct.
se...@gmail.com <se...@gmail.com> #28
Using android studio 0.8 and the issue remains present.
ma...@gmail.com <ma...@gmail.com> #29
Is there any work being done to solve this issue or is it something that we are expected to live with?
bi...@gmail.com <bi...@gmail.com> #30
Try setting this in the dependency project
android {
publishNonDefault true
...
}
and this in the project that uses it
dependencies {
releaseCompile project(path: ':theotherproject', configuration: 'release')
debugCompile project(path: ':theotherproject', configuration: 'debug')
}
Taken from here:https://code.google.com/p/android/issues/detail?id=66805
android {
publishNonDefault true
...
}
and this in the project that uses it
dependencies {
releaseCompile project(path: ':theotherproject', configuration: 'release')
debugCompile project(path: ':theotherproject', configuration: 'debug')
}
Taken from here:
[Deleted User] <[Deleted User]> #31
Doesn't work if you have flavors, it says:
Error:Configuration with name 'release' not found.
Error:Configuration with name 'release' not found.
xa...@android.com <xa...@android.com> #32
Yes it will be fixed but it's going to take a few months.
Using publishNonDefault with Flavors makes things more complicated because the library publishes all combinations, so you'll need to specific flavor1Debug instead of just debug. This does not scale well.
Using publishNonDefault with Flavors makes things more complicated because the library publishes all combinations, so you'll need to specific flavor1Debug instead of just debug. This does not scale well.
[Deleted User] <[Deleted User]> #33
As a workaround, you can use this method, which uses reflection to get the field value from the app (not the library):
/**
* Gets a field from the project's BuildConfig. This is useful when, for example, flavors
* are used at the project level to set custom fields.
* @param context Used to find the correct file
* @param fieldName The name of the field-to-access
* @return The value of the field, or {@code null} if the field is not found.
*/
public static Object getBuildConfigValue(Context context, String fieldName) {
try {
Class<?> clazz = Class.forName(context.getPackageName() + ".BuildConfig");
Field field = clazz.getField(fieldName);
return field.get(null);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (NoSuchFieldException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
return null;
}
To get the `DEBUG` field, for example, just call this from your `Activity`:
boolean debug = (Boolean) getBuildConfigValue(this, "DEBUG");
I have also answered this on StackOverflow:http://stackoverflow.com/a/25267049/763080
/**
* Gets a field from the project's BuildConfig. This is useful when, for example, flavors
* are used at the project level to set custom fields.
* @param context Used to find the correct file
* @param fieldName The name of the field-to-access
* @return The value of the field, or {@code null} if the field is not found.
*/
public static Object getBuildConfigValue(Context context, String fieldName) {
try {
Class<?> clazz = Class.forName(context.getPackageName() + ".BuildConfig");
Field field = clazz.getField(fieldName);
return field.get(null);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (NoSuchFieldException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
return null;
}
To get the `DEBUG` field, for example, just call this from your `Activity`:
boolean debug = (Boolean) getBuildConfigValue(this, "DEBUG");
I have also answered this on StackOverflow:
da...@gmail.com <da...@gmail.com> #34
What's this
[Deleted User] <[Deleted User]> #36
Er, this has to be one of the biggest issues with AndroidStudio, no? Why is it not being addressed? Is AS really for monolithic apps with no re-use ?
[Deleted User] <[Deleted User]> #37
This should be fixed before the 1.0 release of the Android Gradle Plugin
pa...@gmail.com <pa...@gmail.com> #38
1.0 Android Gradle Plugin is already out and it's still not fixed
[Deleted User] <[Deleted User]> #39
It's only a RC 1.0.0-rc4 (2014/12/04)
ar...@gmail.com <ar...@gmail.com> #41
Could we get a link to the issue tracking this on Gradle's tracker? It'd be great to follow their solution to the underlying problem too.
sp...@gmail.com <sp...@gmail.com> #42
There are lots of potential solutions to this. You really just need to get the boolean value of BuildConfig.DEBUG into the library project. What I've been doing is in the library project I create an abstract class called BaseApplication that extends Application, with some abstract method like:
public abstract boolean isBuildConfigDebug();
In BaseApplication I also have a static variable: private static boolean mIsDebug;
with access to the variable via a method:
public static boolean isDebug() {
return mIsDebug;
}
Then in BaseApplication I override onCreate and the first thing I do is call:
mIsDebug = isBuildConfigDebug();
Then instead of using BuildConfig.DEBUG in the library application, I call BaseApplication.isDebug();
Yes it's hacky, but it's easy, and I haven't had any issues with it.
public abstract boolean isBuildConfigDebug();
In BaseApplication I also have a static variable: private static boolean mIsDebug;
with access to the variable via a method:
public static boolean isDebug() {
return mIsDebug;
}
Then in BaseApplication I override onCreate and the first thing I do is call:
mIsDebug = isBuildConfigDebug();
Then instead of using BuildConfig.DEBUG in the library application, I call BaseApplication.isDebug();
Yes it's hacky, but it's easy, and I haven't had any issues with it.
[Deleted User] <[Deleted User]> #43
The potential solutions I've seen offer a replacement for the DEBUG decision, which will work, for simple boolean based logic differences like log level or some such. However building Google Maps
V1 with Debug/Release API keys is more of a challenge. The map api keys are embedded in layouts, which should be specified for Debug and Release resources separately. The issue is that the debug resources are not being built on a debug app, and you can't work around that so easily. (this is not a challenge, don't sweat it!)
V1 with Debug/Release API keys is more of a challenge. The map api keys are embedded in layouts, which should be specified for Debug and Release resources separately. The issue is that the debug resources are not being built on a debug app, and you can't work around that so easily. (this is not a challenge, don't sweat it!)
ma...@gmail.com <ma...@gmail.com> #44
#50, why does the solution proposed in #35 not work for you? It sounds like it does exactly what you want.
do...@gmail.com <do...@gmail.com> #45
Martin, solution #35 compiles *both* debug and release versions of library and then links to correct one. This is OK as long as compilation of library does not take long. In may case, library has got a lot of native code and compilation lasts several minutes.
ma...@gmail.com <ma...@gmail.com> #46
Yes, that's the downside of this solution. I could workaround it by using defaultPublishConfig instead of publishNonDefault and setting it's value with a property on the command line, but this again has it's downsides, so I hope this will be fixed soon.
ma...@gmail.com <ma...@gmail.com> #47
To #51, it looks like #35 does work except for flavors as pointed out by #36? Thanks for pointing that out, I had skipped it because it didn't seem like a complete solution.
ma...@gmail.com <ma...@gmail.com> #48
da...@gmail.com <da...@gmail.com> #49
here's a workaround for people that needs to build a jni/native module for different architectures based on the productFlavor or buildType of the main app without manually changing the Application.mk and without pre-building all of them.
basically you need to rewrite on the fly the Application.mk of your module from the build.gradle of your main app.
In the attachment there is my build.gradle of my main build.gradle (stripped down from the extra stuff)
WARNING: in the module i build the jni lib using a custom Application.mk that NEEDS to have these lines inside it
###################################################################################
# THIS FILE IS MODIFIED BY ndkUpdateApplicationMk
# ANY CHANGE TO THESE LINES WILL BE OVERWRITTEN @ NEXT COMPILE
APP_ABI :=
APP_OPTIM :=
NDK_DEBUG :=
###################################################################################
It's a kind of a dirty hack, but it works for me and it could be easily adapted to work with the split-apk feature too.
PS: i am not sure that NDK_DEBUG could be specified inside the Application.mk, but worth a try (i don't need it).
basically you need to rewrite on the fly the Application.mk of your module from the build.gradle of your main app.
In the attachment there is my build.gradle of my main build.gradle (stripped down from the extra stuff)
WARNING: in the module i build the jni lib using a custom Application.mk that NEEDS to have these lines inside it
###################################################################################
# THIS FILE IS MODIFIED BY ndkUpdateApplicationMk
# ANY CHANGE TO THESE LINES WILL BE OVERWRITTEN @ NEXT COMPILE
APP_ABI :=
APP_OPTIM :=
NDK_DEBUG :=
###################################################################################
It's a kind of a dirty hack, but it works for me and it could be easily adapted to work with the split-apk feature too.
PS: i am not sure that NDK_DEBUG could be specified inside the Application.mk, but worth a try (i don't need it).
[Deleted User] <[Deleted User]> #50
When I write a Log library all the log output methods are controlled by BuildConfig.DEBUG. it is really useful to use a const value like BuildConfig.DEBUG to indicate compiler optimize all the log code if this limit can be solved.
do...@gmail.com <do...@gmail.com> #51
Regarding #37, why is this solution not good? What do you mean "it does not scale well"? It is actually what we need in our project. We have app that has multiple flavors (appFlavor1, appFlavor2, ..., appFlavor6) and two build types (debug, release). The app depends on library that has multiple flavors (libFlavor1, libFlavor2, ..., libFlavor15) and three build types (debug, release, distribute). So what we need is exactly something like this:
dependencies {
appFlavor1ReleaseCompile project(path: ':libraryProject', configuration: 'libFlavor3Release')
appFlavor1DebugCompile project(path: ':libraryProject', configuration: 'libFlavor3Debug')
appFlavor2ReleaseCompile project(path: ':libraryProject', configuration: 'libFlavor7Release')
appFlavor2DebugCompile project(path: ':libraryProject', configuration: 'libFlavor7Debug')
appFlavor3ReleaseCompile project(path: ':libraryProject', configuration: 'libFlavor1Distribute')
appFlavor3DebugCompile project(path: ':libraryProject', configuration: 'libFlavor1Release')
}
Notice that in example there is different number of flavors and build types in library and app so automatic forwarding of build types makes actually no sense. We want release version of app flavor 1 to depend on release version of lib flavor 3 and we want the release version of app flavor 3 to depend on distribute version of lib flavor 1.
Can't the fix simply be by generating DSL methods for every buildType - flavor combination in dependencies object? This is already done for every build type (you get debugCompile and releaseCompile) and for every flavor (you get flavor1Compile etc.). Why is so complicated to create all combinations (flavor1DebugCompile)? Why is this issue not resolved for almost two years now?
dependencies {
appFlavor1ReleaseCompile project(path: ':libraryProject', configuration: 'libFlavor3Release')
appFlavor1DebugCompile project(path: ':libraryProject', configuration: 'libFlavor3Debug')
appFlavor2ReleaseCompile project(path: ':libraryProject', configuration: 'libFlavor7Release')
appFlavor2DebugCompile project(path: ':libraryProject', configuration: 'libFlavor7Debug')
appFlavor3ReleaseCompile project(path: ':libraryProject', configuration: 'libFlavor1Distribute')
appFlavor3DebugCompile project(path: ':libraryProject', configuration: 'libFlavor1Release')
}
Notice that in example there is different number of flavors and build types in library and app so automatic forwarding of build types makes actually no sense. We want release version of app flavor 1 to depend on release version of lib flavor 3 and we want the release version of app flavor 3 to depend on distribute version of lib flavor 1.
Can't the fix simply be by generating DSL methods for every buildType - flavor combination in dependencies object? This is already done for every build type (you get debugCompile and releaseCompile) and for every flavor (you get flavor1Compile etc.). Why is so complicated to create all combinations (flavor1DebugCompile)? Why is this issue not resolved for almost two years now?
do...@gmail.com <do...@gmail.com> #52
OK, I have achieved #59 with following hack:
Map<String, Dependency> customDeps = new HashMap<String, Dependency>()
customDeps.put("appFlavor1DebugCompile", dependencies.project(path: ":mylibrary", configuration: "libFlavor1Debug"))
customDeps.put("appFlavor1ReleaseCompile", dependencies.project(path: ":mylibrary", configuration: "libFlavor1Release"))
customDeps.put("appFlavor2DebugCompile", dependencies.project(path: ":mylibrary", configuration: "libFlavor3Debug"))
customDeps.put("appFlavor2ReleaseCompile", dependencies.project(path: ":mylibrary", configuration: "libFlavor3Release"))
customDeps.put("appFlavor3DebugCompile", dependencies.project(path: ":mylibrary", configuration: "libFlavor5Debug"))
customDeps.put("appFlavor3ReleaseCompile", dependencies.project(path: ":mylibrary", configuration: "libFlavor5Release"))
configurations.all() {config ->
Dependency d = customDeps.get(config.name )
if(d != null) {
config.dependencies.add(d)
}
}
An example gradle project is attached in this comment.
However, there is now another bug to address: I've already reported it in issue 36949180 (https://code.google.com/p/android/issues/detail?id=78997 ). The problem is that even if you build only one configuration of your app, all configurations will be built, thus triggering build of all dependencies which consumes a lot of time.
For example, in attached zip you can execute task :app:assembleAppFlavor1Debug and you will end up executing all following tasks:
$ ./gradlew :app:assembleAppFlavor1Debug
:app:preBuild
:app:preAppFlavor1DebugBuild
:app:compileAppFlavor1DebugNdk
:app:checkAppFlavor1DebugManifest
:app:preAppFlavor1ReleaseBuild // why is this task reached
:app:preAppFlavor2DebugBuild // why is this task reached
:app:preAppFlavor2ReleaseBuild // why is this task reached
:app:preAppFlavor3DebugBuild // why is this task reached
:app:preAppFlavor3ReleaseBuild // why is this task reached
... and now all flavors of library are built
Map<String, Dependency> customDeps = new HashMap<String, Dependency>()
customDeps.put("appFlavor1DebugCompile", dependencies.project(path: ":mylibrary", configuration: "libFlavor1Debug"))
customDeps.put("appFlavor1ReleaseCompile", dependencies.project(path: ":mylibrary", configuration: "libFlavor1Release"))
customDeps.put("appFlavor2DebugCompile", dependencies.project(path: ":mylibrary", configuration: "libFlavor3Debug"))
customDeps.put("appFlavor2ReleaseCompile", dependencies.project(path: ":mylibrary", configuration: "libFlavor3Release"))
customDeps.put("appFlavor3DebugCompile", dependencies.project(path: ":mylibrary", configuration: "libFlavor5Debug"))
customDeps.put("appFlavor3ReleaseCompile", dependencies.project(path: ":mylibrary", configuration: "libFlavor5Release"))
configurations.all() {config ->
Dependency d = customDeps.get(
if(d != null) {
config.dependencies.add(d)
}
}
An example gradle project is attached in this comment.
However, there is now another bug to address: I've already reported it in
For example, in attached zip you can execute task :app:assembleAppFlavor1Debug and you will end up executing all following tasks:
$ ./gradlew :app:assembleAppFlavor1Debug
:app:preBuild
:app:preAppFlavor1DebugBuild
:app:compileAppFlavor1DebugNdk
:app:checkAppFlavor1DebugManifest
:app:preAppFlavor1ReleaseBuild // why is this task reached
:app:preAppFlavor2DebugBuild // why is this task reached
:app:preAppFlavor2ReleaseBuild // why is this task reached
:app:preAppFlavor3DebugBuild // why is this task reached
:app:preAppFlavor3ReleaseBuild // why is this task reached
... and now all flavors of library are built
do...@gmail.com <do...@gmail.com> #53
For some reason attachment in #60 is missing, so I am adding it again.
do...@gmail.com <do...@gmail.com> #54
OK, redundant builds reported in #60 are gone if you remove dependency to google play services as suggested in issue 36949180 .
an...@gmail.com <an...@gmail.com> #55
@62, #60 worked just fine for my project!
[Deleted User] <[Deleted User]> #56
#35 did the trick for my config:
Main:
task wrapper(type: org.gradle.api.tasks.wrapper.Wrapper) {
gradleVersion = '1.9'
}
Module (theotherproject):
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
}
}
apply plugin: 'com.android.library'
...
if you got
"Cannot evaluate module theotherproject : Configuration with name 'debug' not found."
you are missing the
android {
publishNonDefault true
...
}
Main:
task wrapper(type: org.gradle.api.tasks.wrapper.Wrapper) {
gradleVersion = '1.9'
}
Module (theotherproject):
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
}
}
apply plugin: 'com.android.library'
...
if you got
"Cannot evaluate module theotherproject : Configuration with name 'debug' not found."
you are missing the
android {
publishNonDefault true
...
}
wa...@gmail.com <wa...@gmail.com> #57
This problem has been exist from the beginning and I can see Android Team is working it out, So when will the patch will be released? Android Studio's Build Variant makes people frustrated. Looking forward to have it fixed.
sc...@gmail.com <sc...@gmail.com> #58
je...@google.com <je...@google.com>
zh...@gmail.com <zh...@gmail.com> #59
same problem after updated to "Android Studio 1.2 Beta 3"
m....@gmail.com <m....@gmail.com> #60
The fix is planned for Gradle Plugin version 1.4, and the latest version is "only" 1.2.0-beta1.
yu...@google.com <yu...@google.com> #61
can someone please add a link to the bug in the gradle issue tracker that this bug depends on
hu...@gmail.com <hu...@gmail.com> #62
Jesus!!!!!
It's been two years !!!!
It's been two years !!!!
[Deleted User] <[Deleted User]> #63
Re: #70 y...@google.com
I couldn't identify any related issues onissues.gradle.org , however, the required Gradle improvements are mentioned on the Gradle roadmap:
Variant Aware Dependency Management
http://discuss.gradle.org/t/variant-aware-dependency-management/115
I couldn't identify any related issues on
Variant Aware Dependency Management
ap...@gmail.com <ap...@gmail.com> #64
Is this bug still not fixed? Its an important issue.
he...@163.com <he...@163.com> #65
ganjinjiejiejue
mo...@bbva.com <mo...@bbva.com> #66
I have the same bug: "Error:Configuration with name 'production' not found."
in...@gmail.com <in...@gmail.com> #67
Experiencing the same thing. Whether I am using assembleDebug or assembleRelease both buildTypes are fired. This causes all sorts of problems with signing, versioning and debug-flags.
bu...@gmail.com <bu...@gmail.com> #68
not fixed?
af...@gmail.com <af...@gmail.com> #69
It says it'll be fixed in gradle plugin 1.4. Right now, I believe 1.3 is in alpha/beta. Hang in there.
be...@google.com <be...@google.com> #70
Just to set the expectations, please see Xav's comments, e.g. #8. This is blocked on Gradle, see https://discuss.gradle.org/t/variant-aware-dependency-management/115 . It most likely not be fixed in 1.4.
vi...@gmail.com <vi...@gmail.com> #71
Why haven't it have been fixed 2013? WHY?!
With this bug ANY development with linked library module is PRACTICALLY IMPOSSIBLE.
With this bug ANY development with linked library module is PRACTICALLY IMPOSSIBLE.
mr...@gmail.com <mr...@gmail.com> #72
as others said it is too stupid bug . i am developing a library for android projects and i can't use it in debug variant
cc...@gmail.com <cc...@gmail.com> #73
For me #35 is a valid workaround that help me manage about 4 library projects all in debug mode within the final APK.
sh...@gmail.com <sh...@gmail.com> #74
Hey guys, you can define other field for BuildConfig and manage it in parallel with debug/release assembly.
For example:
--------------------------------
gradle.properties
SNAPSHOT=true
--------------------------------
build.gradle
subprojects {
android {
defaultConfig {
String snapshot = (Boolean.valueOf(getProperty('SNAPSHOT').toString())) ? "Boolean.parseBoolean(\"true\")" : "false"
buildConfigField 'boolean', 'SNAPSHOT', snapshot
}
}
}
--------------------------------
SomeWhere.java
import static com.yourcompany.library.BuildConfig.SNAPSHOT;
void f() {
if (SNAPSHOT) {
Log.v(LOG_TAG, "This code will be kicked out by compiler when SNAPSHOT=false");
}
}
--------------------------------
Now when you building release apk, just override this property:
./gradlew assembleRelease -PSNAPSHOT=false
Btw, following this approach you may keep SNAPSHOT=true if needed to test release apk with verbose logs.
For example:
--------------------------------
gradle.properties
SNAPSHOT=true
--------------------------------
build.gradle
subprojects {
android {
defaultConfig {
String snapshot = (Boolean.valueOf(getProperty('SNAPSHOT').toString())) ? "Boolean.parseBoolean(\"true\")" : "false"
buildConfigField 'boolean', 'SNAPSHOT', snapshot
}
}
}
--------------------------------
SomeWhere.java
import static com.yourcompany.library.BuildConfig.SNAPSHOT;
void f() {
if (SNAPSHOT) {
Log.v(LOG_TAG, "This code will be kicked out by compiler when SNAPSHOT=false");
}
}
--------------------------------
Now when you building release apk, just override this property:
./gradlew assembleRelease -PSNAPSHOT=false
Btw, following this approach you may keep SNAPSHOT=true if needed to test release apk with verbose logs.
vi...@gmail.com <vi...@gmail.com> #75
[Comment deleted]
vi...@gmail.com <vi...@gmail.com> #76
[Comment deleted]
vi...@gmail.com <vi...@gmail.com> #77
[Comment deleted]
vi...@gmail.com <vi...@gmail.com> #78
#83 and #82 are pretty much useless, because gradle will build release version too when building just in debug. So compile time will be spectacularly slow.
Gradle is just bloated piece of crap, just like Android as a whole. And Google doesn't care, because it monetizes on ads in cheap phones, not on quality and good apps.
Gradle is just bloated piece of crap, just like Android as a whole. And Google doesn't care, because it monetizes on ads in cheap phones, not on quality and good apps.
sh...@gmail.com <sh...@gmail.com> #79
[Comment deleted]
sh...@gmail.com <sh...@gmail.com> #80
It seems like you don't understand what everyone expect from debug/release build.
Almost all authors above are using BuildConfig.DEBUG field which is always false due to this issue.
I propose to define custom field and control it manually.
This approach works fine for my goals:
- remove useless log-messages from binaries
- add more checks (like strict-mode) for debug mode only
Almost all authors above are using BuildConfig.DEBUG field which is always false due to this issue.
I propose to define custom field and control it manually.
This approach works fine for my goals:
- remove useless log-messages from binaries
- add more checks (like strict-mode) for debug mode only
vi...@gmail.com <vi...@gmail.com> #81
Оhow will you develop a library without ability to debug it (because it is in release build)?
ma...@gmail.com <ma...@gmail.com> #82
#80, it is not true that it is impossible to work with library projects, it's just inconvenient.
#83, this solution only is a replacement for the DEBUG flag in BuildConfig, but there can be many differences between the release and debug build types, e.g. ProGuard or different source files or assets.
To workaround the issue define a property in gradle.properties:
buildType=debug
And use it for the defaultPublishConfig field, e.g. in the main build.gradle:
subprojects {
android {
defaultPublishConfig properties['buildType']
}
}
This way the debug build type of the libraries is published during development. If you want to do a release build just add -PbuildType=release to the build command. Note that with this solution you can't do a debug and a release build with a single command.
#83, this solution only is a replacement for the DEBUG flag in BuildConfig, but there can be many differences between the release and debug build types, e.g. ProGuard or different source files or assets.
To workaround the issue define a property in gradle.properties:
buildType=debug
And use it for the defaultPublishConfig field, e.g. in the main build.gradle:
subprojects {
android {
defaultPublishConfig properties['buildType']
}
}
This way the debug build type of the libraries is published during development. If you want to do a release build just add -PbuildType=release to the build command. Note that with this solution you can't do a debug and a release build with a single command.
ma...@gmail.com <ma...@gmail.com> #83
#79, it's already two years since Xavier announced that he has discussed a solution with the Gradle devs, and he hopes that the needed changes will be in Gradle 1.8. We are now close to the release of Gradle 2.5. Later the fix was targeted for Studio 0.5.0, then for the beta, and finally for 1.4. Now you tell us that we have to wait even longer. Also the linked blog post from Hans Dockter does not give any timeline.
This is by far the most starred issue for Subcomponent-Tools-Gradle, so please don't ask us to lower our expectations and instead put more effort into fixing this. And also make the process more transparent and provide us more information, like links to related Gradle issues, instead of just delaying the fix again and again.
This is by far the most starred issue for Subcomponent-Tools-Gradle, so please don't ask us to lower our expectations and instead put more effort into fixing this. And also make the process more transparent and provide us more information, like links to related Gradle issues, instead of just delaying the fix again and again.
vi...@gmail.com <vi...@gmail.com> #84
#91 martin, it's inconvenient up to the scale of impossible.
My complex iOS project written in Objective-C that contains my library and several third-party libraries compiles incrementally IN 6 SECOND. SIX, CARL!
Gradle, on other side, compiles much simpler project incrementally for over 30 seconds on the same machine.
After polished and fast iOS development process I hate slow, bulky and unresponsive Android build tools, emulator and eternal buggy API.
This Issue Ticket is an example that Google cannot for over 2 years to fix most important of bugs.
DIE, Android! I'm writing for you only because every teenager without money doesn't have any other smartphone choice. I hope Microsoft will make good cheap phones and Google will have to fix all this Gradle crap (and Android's Bluetooth too).
My complex iOS project written in Objective-C that contains my library and several third-party libraries compiles incrementally IN 6 SECOND. SIX, CARL!
Gradle, on other side, compiles much simpler project incrementally for over 30 seconds on the same machine.
After polished and fast iOS development process I hate slow, bulky and unresponsive Android build tools, emulator and eternal buggy API.
This Issue Ticket is an example that Google cannot for over 2 years to fix most important of bugs.
DIE, Android! I'm writing for you only because every teenager without money doesn't have any other smartphone choice. I hope Microsoft will make good cheap phones and Google will have to fix all this Gradle crap (and Android's Bluetooth too).
bo...@gmail.com <bo...@gmail.com> #85
This is not the place to vent all of your frustrations. Keep it professional and don't spam others that have starred this bug with your non constructive comments please.
vi...@gmail.com <vi...@gmail.com> #86
#94 I think it is exactly the place, because starring the bug have no effect.
I can link you TENS of other (more specific, but no less stupid) bugs about what Google doesn't care.
In Bluetooth:https://code.google.com/p/android/issues/detail?id=63056
In Audio:https://code.google.com/p/android/issues/detail?id=3434
In WiFi:https://code.google.com/p/android/issues/detail?id=35585
Basically, EVERY system framework on Android DOESNT WORK CORRECTLY. This is insane for iOS developer like me. :) I'm accustomed to situation when if you have system framework and documentation for it, it is working with maybe with 1-2 small bugs or small corner cases.
There is 3-year old article about this:http://darkdust.net/writings/whyihateandroid — it seems that everything in it still holds true.
I can link you TENS of other (more specific, but no less stupid) bugs about what Google doesn't care.
In Bluetooth:
In Audio:
In WiFi:
Basically, EVERY system framework on Android DOESNT WORK CORRECTLY. This is insane for iOS developer like me. :) I'm accustomed to situation when if you have system framework and documentation for it, it is working with maybe with 1-2 small bugs or small corner cases.
There is 3-year old article about this:
bo...@gmail.com <bo...@gmail.com> #87
This is not a discussion forum, you are spamming 290 people with every update. Stop it.
ep...@gmail.com <ep...@gmail.com> #88
Is there any hope to see a fix for this issue, or shall we consider the work around to be the only way long term to rely on custom flags passed to the build process ?
do...@gmail.com <do...@gmail.com> #89
@97 So far as it seems I would place my bets on implementing custom workarounds as I suggested in #60. We are doing that for 6 months now at our company and we live with it...
do...@gmail.com <do...@gmail.com> #90
Actually, I can think of a case when you actually want debug version of your app to depend on release version of a library: for example if your library performs some performance critical tasks, like video frame processing and you just want to find a bug in your app, not wasting time for slow performance of library in debug mode.
I think it would be best to let developers choose for each build type the build type of every dependency. Currently there is a hackish way of achieving that (see my comment #60 ) and I hope such thing will be officially supported in dependency block. The only downside is that this hack currently triggers a very annoying bug reported in issue 36949180 , but there is even hackish workaround for that issue - see comments 11 and 15 in issue 36949180 .
I hope that Android Gradle team will fix issue 36949180 and provide an official way of defining per-flavor per-build type dependencies between application and library.
I think it would be best to let developers choose for each build type the build type of every dependency. Currently there is a hackish way of achieving that (see my
I hope that Android Gradle team will fix
aa...@gmail.com <aa...@gmail.com> #91
They're currently getting close to releasing the next-gen plugin. I'd put good money on the fix being rolled in with that. Just my 2c.
de...@gmail.com <de...@gmail.com> #93
Doesn anyone know whether this has been fixed in Android Studio 1.4?
se...@mobiquite.fr <se...@mobiquite.fr> #94
No, it is not fixed in Android Studio 1.4
#60 works fine but works only for 1 dependency lib (=if you need to specify a configuration to only 1 sub-lib "mylibrary")
What I need is to include several libs as following:
customDeps.put("appFlavor1DebugCompile", dependencies.project(path: ":mylibrary", configuration: "libFlavor1Debug"))
...
customDeps2.put("appFlavor1DebugCompile", dependencies.project(path: ":mylibrary2", configuration: "libFlavor1Debug"))
I've succeeded in adding 2 dependencies to the sameconfig.name by using 2 blocks of code shown in #60 (with 2 different hashmaps). Here are the prints:
Name: appFlavor1DebugCompile
Dependencies: [DefaultProjectDependency{dependencyProject='project ':mylibrary'', configuration='debug'}, DefaultProjectDependency{dependencyProject='project ':mylibrary2'', configuration='default'}]
But at compilation, it includes only the first lib (mylibrary) and then failed to find classes/methods of the second lib (mylibrary2)...
DodoEnte...@gmail.com (or someone else) do you have any solution?
Thanks.
#60 works fine but works only for 1 dependency lib (=if you need to specify a configuration to only 1 sub-lib "mylibrary")
What I need is to include several libs as following:
customDeps.put("appFlavor1DebugCompile", dependencies.project(path: ":mylibrary", configuration: "libFlavor1Debug"))
...
customDeps2.put("appFlavor1DebugCompile", dependencies.project(path: ":mylibrary2", configuration: "libFlavor1Debug"))
I've succeeded in adding 2 dependencies to the same
Name: appFlavor1DebugCompile
Dependencies: [DefaultProjectDependency{dependencyProject='project ':mylibrary'', configuration='debug'}, DefaultProjectDependency{dependencyProject='project ':mylibrary2'', configuration='default'}]
But at compilation, it includes only the first lib (mylibrary) and then failed to find classes/methods of the second lib (mylibrary2)...
DodoEnte...@gmail.com (or someone else) do you have any solution?
Thanks.
ni...@gmail.com <ni...@gmail.com> #97
Still happens, here is my configuration :
gradle 2.9
android gradle plugin 1.3.0
compileSdkVersion = 20
buildToolsVersion = "23.0"
Best work around I found was to configure ProGuard to keep needed debugging information. I found the solution here :http://stackoverflow.com/questions/28836243/android-studios-debugger-not-stopping-at-breakpoints-within-library-modules
A fix for this would be very appreciated.
gradle 2.9
android gradle plugin 1.3.0
compileSdkVersion = 20
buildToolsVersion = "23.0"
Best work around I found was to configure ProGuard to keep needed debugging information. I found the solution here :
A fix for this would be very appreciated.
pa...@gmail.com <pa...@gmail.com> #98
how do you implement the solution #37 in the new experimental gradle syntax . Expanded post on it https://groups.google.com/forum/?fromgroups#!topic/android-ndk/kKZpiXbOW7k
trying to use
dependencies {
flavorDebugCompile project([path: ':custom_lib', configuration: "libraryDebug"])
It gives the following error:
flavorDebugCompile method not found
trying to use
dependencies {
flavorDebugCompile project([path: ':custom_lib', configuration: "libraryDebug"])
It gives the following error:
flavorDebugCompile method not found
[Deleted User] <[Deleted User]> #99
I have a hacky workaround.
custom_library build.gradle:
dependencies {
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
}
^ yes the above will always use the releaseCompile so this is actually pointless BUT .. future proof
app module that depends on library build.gradle:
dependencies {
compile (project(':custom_library')) {
exclude group: 'com.squareup.leakcanary'
}
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
}
custom_library build.gradle:
dependencies {
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
}
^ yes the above will always use the releaseCompile so this is actually pointless BUT .. future proof
app module that depends on library build.gradle:
dependencies {
compile (project(':custom_library')) {
exclude group: 'com.squareup.leakcanary'
}
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
}
[Deleted User] <[Deleted User]> #101
I'm having this issue on gradle-experimental:0.6.0-beta5
Error:(278, 0) Gradle DSL method not found: 'debugCompile()'
Possible causes:The project 'AndroidFleksy' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper file The build file may be missing a Gradle plugin.
Error:(278, 0) Gradle DSL method not found: 'debugCompile()'
Possible causes:The project 'AndroidFleksy' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper file The build file may be missing a Gradle plugin.
nu...@gmail.com <nu...@gmail.com> #102
Just fix problem
lo...@gmail.com <lo...@gmail.com> #103
3 f'n years later and still not fixed. and colleagues wonder why I miss eclipse - it just worked.
lo...@gmail.com <lo...@gmail.com> #105
Plugin 1.5.0
Android Studio 2.1 RC
Gradle 2.10
I have very similar issue. Whenever I'm adding external dependency by using
dependency {
compile 'com.corp:corp-api:0.1.1-SNAPSHOT'
}
new, very strange task appears, the name of task is like:
:lib2:prepareComCorpCorpApi011SNAPSHOTLibrary
which depends on
:lib1:bundleLibraryDebug
:lib1:bundleLibraryRelease <<<<<<<<<<<<-----
So it does not matter which kind of build I'm running, release of debug (or flavored ones), anyway all the build types are fired...
Any ideas ?
Android Studio 2.1 RC
Gradle 2.10
I have very similar issue. Whenever I'm adding external dependency by using
dependency {
compile 'com.corp:corp-api:0.1.1-SNAPSHOT'
}
new, very strange task appears, the name of task is like:
:lib2:prepareComCorpCorpApi011SNAPSHOTLibrary
which depends on
:lib1:bundleLibraryDebug
:lib1:bundleLibraryRelease <<<<<<<<<<<<-----
So it does not matter which kind of build I'm running, release of debug (or flavored ones), anyway all the build types are fired...
Any ideas ?
an...@gmail.com <an...@gmail.com> #106
I'm using trick on #60 with some libraries. However this doesn't appear to work when using gradle experimental to build a shared library!
Can't believe it's been 2 years and it's still not fixed!
I don't want DEBUG code in the final shared library or Java code, but only trick is to use a variable, hence all codes gets in release APKs if I don't manually edit the gradle file. Pretty shitty if you ask me.
Can't believe it's been 2 years and it's still not fixed!
I don't want DEBUG code in the final shared library or Java code, but only trick is to use a variable, hence all codes gets in release APKs if I don't manually edit the gradle file. Pretty shitty if you ask me.
an...@gmail.com <an...@gmail.com> #107
Using latest gradle with AS2.1, I was able to solve this issue with a very simple dependency content:
Lib's build.gradle (uses experimental gradle 0.7.0):
model {
android {
...
productFlavors {
create('all') {
...
}
}
publishNonDefault true
}
}
configurations {
allDebug
allRelease
}
App's build.gradle (uses standard gradle 2.1.0):
debugCompile project(path: ':lib', configuration: 'allDebug')
releaseCompile project(path: ':lib', configuration: 'allRelease')
I'm pretty sure the productFlavors in the lib's gradle is not needed if using debug/release configurations only.
Lib's build.gradle (uses experimental gradle 0.7.0):
model {
android {
...
productFlavors {
create('all') {
...
}
}
publishNonDefault true
}
}
configurations {
allDebug
allRelease
}
App's build.gradle (uses standard gradle 2.1.0):
debugCompile project(path: ':lib', configuration: 'allDebug')
releaseCompile project(path: ':lib', configuration: 'allRelease')
I'm pretty sure the productFlavors in the lib's gradle is not needed if using debug/release configurations only.
e....@gmail.com <e....@gmail.com> #108
I have been waiting for this to be resolved for a year. A bit frustrating. Any estimation when it will be fixed?
ge...@gmail.com <ge...@gmail.com> #109
This bug makes my development work difficult. I define values for debug and release with buildConfigField in the library module but they are simply ignored (only the values of release are taken no matter what).
sr...@gmail.com <sr...@gmail.com> #110
[Comment deleted]
cp...@gmail.com <cp...@gmail.com> #111
As others suggested debugCompile/releaseCompile doesn't exist in gradle-experimental. Instead I was able to force building dependency (library) setting defaultPublishConfig "debug" (or "release") inside model.android.
Probably not important, but my library is external though linked inside project as described here:
http://www.philosophicalhacker.com/2014/10/03/an-alternative-multiproject-setup-for-android-studio/
Probably not important, but my library is external though linked inside project as described here:
tr...@gmail.com <tr...@gmail.com> #112
I have the same problem even with AS 2.1.3. It keeps try to run Proguard and build my lirary as Realease. I added and selected debug build variant to all projects with no luck. This takes a lot of time and making development progress lagged. Please address and fix. Thanks.
ul...@gmail.com <ul...@gmail.com> #113
Hello, i have another approach:
build.gradle (lib):
---------------------------------------------------------------------
apply plugin: 'com.android.library'
android {
publishNonDefault true
...
buildTypes {
release {
...
}
debug {
...
}
}
}
dependencies {
...
}
---------------------------------------------------------------------
build.gradle (application)
---------------------------------------------------------------------
apply plugin: 'com.android.application'
android {
...
buildTypes {
release {
...
}
debug {
...
}
}
}
dependencies {
debugCompile project(path: ':libName', configuration: "debug")
releaseCompile project(path: ':libName', configuration: "release")
...
}
build.gradle (lib):
---------------------------------------------------------------------
apply plugin: 'com.android.library'
android {
publishNonDefault true
...
buildTypes {
release {
...
}
debug {
...
}
}
}
dependencies {
...
}
---------------------------------------------------------------------
build.gradle (application)
---------------------------------------------------------------------
apply plugin: 'com.android.application'
android {
...
buildTypes {
release {
...
}
debug {
...
}
}
}
dependencies {
debugCompile project(path: ':libName', configuration: "debug")
releaseCompile project(path: ':libName', configuration: "release")
...
}
ss...@gmail.com <ss...@gmail.com> #114
@128: What's the new target for the fix?
xa...@google.com <xa...@google.com> #115
This is actively being worked on. Target is 2.5.
[Deleted User] <[Deleted User]> #117
[Comment deleted]
ne...@gmail.com <ne...@gmail.com> #118
I afflicts the problem, work performance is low by recompiling the configuration. I tried the 2.5.0 and does not give me the solution to the problem.
xa...@google.com <xa...@google.com> #119
This is fixed in 3.0!
lb...@gmail.com <lb...@gmail.com> #120
@119 Fixed? I can't even create a working signed APK :
https://issuetracker.google.com/issues/38473781
How could it be fixed?
How could it be fixed?
bu...@gmail.com <bu...@gmail.com> #121
interesting
m....@gmail.com <m....@gmail.com> #122
I just tried it with the latest gradle version (com.android.tools.build:gradle:3.0.0-alpha6) - still does not work for non-local dependencies.
I'm wondering if there different behavior between using local library vs. using an (maven) aar dependency. Because the code inside an aar is already compiled - the gradle plugin would need to change the java bytecode of the BuildConfig class.
I'm wondering if there different behavior between using local library vs. using an (maven) aar dependency. Because the code inside an aar is already compiled - the gradle plugin would need to change the java bytecode of the BuildConfig class.
ss...@gmail.com <ss...@gmail.com> #123
@122: I guess you just gave the answer to yourself: It cannot work for already compiled AAR dependencies, because the code in the AAR might not even contain the debug code anymore, e.g. due to dead code elimination done by the compiler when compiling for release mode. And even if that was not the case, patching the AAR's bytecode to change the value of the BuildConfig.DEBUG flag is not feasible to do, IMO.
xa...@google.com <xa...@google.com> #124
This is only for module-to-module publication/consumption. Published AAR only exist in one variant (release).
fo...@googlemail.com <fo...@googlemail.com> #125
IMHO this problem is still existent.
a....@gmail.com <a....@gmail.com> #126
Tested it on alpha-8, still not working
xa...@google.com <xa...@google.com> #127
what is not working?
bi...@gmail.com <bi...@gmail.com> #128
file or directory '/home/user/StudioProjects/ProjectName/app/src/main/kotlin', not found
file or directory '/home/user/StudioProjects/ProjectName/app/src/debug/kotlin', not found
file or directory '/home/user/StudioProjects/ProjectName/app/src/main/kotlin', not found
file or directory '/home/user/StudioProjects/ProjectName/app/src/debug/kotlin', not found
file or directory '/home/user/StudioProjects/ProjectName/app/src/debug/kotlin', not found
file or directory '/home/user/StudioProjects/ProjectName/app/src/main/kotlin', not found
file or directory '/home/user/StudioProjects/ProjectName/app/src/debug/kotlin', not found
bi...@gmail.com <bi...@gmail.com> #129
Android 3.0 Beta 6
je...@google.com <je...@google.com> #130
these are just warning messages.
kh...@gmail.com <kh...@gmail.com> #131
Happening in 3.0 RC1, was not an issue in stable releases like 2.1
kh...@gmail.com <kh...@gmail.com> #132
My bad its not an issue in 3.0 RC1
n1...@gmail.com <n1...@gmail.com> #133
Still happening on 3.0
Trying to set flags depending on build type - release flags works all the time
Trying to set flags depending on build type - release flags works all the time
ra...@gmail.com <ra...@gmail.com> #134
Any updates on this?
pi...@gmail.com <pi...@gmail.com> #135
My project consist of 4 modules. I getting BuildConfig.DEBUG from the package name mypck.com.Buildconfig and it always return false
ge...@gmail.com <ge...@gmail.com> #136
I have defines the same buildTypes in both modules (have only 2) and it works.
ke...@gmail.com <ke...@gmail.com> #138
Hi,I have set publishNonDefault true,and it worked on this. but this code take me new question when i want to upload the sourceCode and javaDoc to maven.would you know how to upload muiltple flavours of sourceCode and javaDoc. thanks.
hu...@gmail.com <hu...@gmail.com> #139
adding publishNonDefault true in gradle-4.10.2 gives the following warning
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
and looking at the source code it seems to be useless, however, the warning message seems to be wrong as I still use the debug variant can't
public void setPublishNonDefault(boolean publishNonDefault) {
logger.warn("publishNonDefault is deprecated and has no effect anymore. All variants are now published.");
}
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
and looking at the source code it seems to be useless, however, the warning message seems to be wrong as I still use the debug variant can't
public void setPublishNonDefault(boolean publishNonDefault) {
logger.warn("publishNonDefault is deprecated and has no effect anymore. All variants are now published.");
}
an...@gmail.com <an...@gmail.com> #140
Any updates on this?
[Deleted User] <[Deleted User]> #141
How to get current buildType in Android Gradle configuration?
tr...@gmail.com <tr...@gmail.com> #142
I'm wondering where number #35 is? How is this marked as fixed? Can we get a solution please?
Description
Gradle plugin does not propagate whether you are doing a debug build or a release build to a dependent android library.
VERSION INFORMATION:
gradle plugin: 0.3
gradle: 1.4
SETUP:
/rootFolder
/rootFolder/androidProject
/rootFolder/androidLibraryProject
rootFolder -> settings.gradle
include 'androidProject'
include 'androidLibraryProject'
androidProject -> build.gradle
apply plugin: 'android'
dependencies {
compile project(':androidLibraryProject')
}
androidLibraryProject -> build.gradle
apply plugin: 'android-library'
STEPS TO REPRODUCE:
cd /rootFolder
gradle assembleDebug
EXPECTED RESULTS:
...
:androidLibraryProject:compileDebug
...
:androidProject:compileDebug
...
ACTUAL RESULTS:
...
:androidLibraryProject:compileRelease
...
:androidProject:compileDebug
...