build.gradle

Could not find method compile()

故事扮演 提交于 2021-02-08 03:41:27
问题 I want to add a lib in android studio but it is not working. Here is a screenshot I also tried to add a dependency in the gradle.build but that also does not work. Maybe it is because I am behind a proxy ? 回答1: You are using the wrong build.gradle file. You can't use compile in the top-level file. Use the module/build.gradle . <PROJECT_ROOT>\app\build.gradle is specific for app module . <PROJECT_ROOT>\build.gradle is a "Top-level build file" where you can add configuration options common to

Gradle build: Removing tasks from the task container is not supported

岁酱吖の 提交于 2021-02-07 20:33:20
问题 I am trying to build a Gradle project using the Ubuntu terminal but it is throwing me the following error. I am not finding any valuable solution. I am using gradle6.0.1. Thanks FAILURE: Build failed with an exception. Where: Script '/home/jamshaid/cas-server/gradle/springboot.gradle' line: 5 What went wrong: A problem occurred evaluating the script. Removing tasks from the task container is not supported. Disable the tasks or use replace() instead. Try: Run with --stacktrace option to get

Gradle build: Removing tasks from the task container is not supported

喜你入骨 提交于 2021-02-07 20:32:31
问题 I am trying to build a Gradle project using the Ubuntu terminal but it is throwing me the following error. I am not finding any valuable solution. I am using gradle6.0.1. Thanks FAILURE: Build failed with an exception. Where: Script '/home/jamshaid/cas-server/gradle/springboot.gradle' line: 5 What went wrong: A problem occurred evaluating the script. Removing tasks from the task container is not supported. Disable the tasks or use replace() instead. Try: Run with --stacktrace option to get

Set Android.mk flag through Gradle depending on build type

故事扮演 提交于 2021-02-07 20:01:25
问题 I need to set a flag inside Android.mk file which tells to the C code whether it's debug mode or not. LOCAL_MODULE := auth LOCAL_SRC_FILES := auth.c LOCAL_CFLAGS := -DDEBUG_MODE=0 LOCAL_EXPORT_CFLAGS := $(LOCAL_CFLAGS) LOCAL_LDLIBS := -llog LOCAL_C_INCLUDES := auth.h include $(BUILD_SHARED_LIBRARY) The problem is that I often forget to change the value when building a release and viceversa so I'm looking forward to a way that does it automatically. I tried changing Android.mk to: LOCAL_CFLAGS

Annotation processor not working - no files are created

前提是你 提交于 2021-02-07 19:22:12
问题 I've now searched for reasons why my own annotation processor is not working in ONE of my projects. Setup looks like following: Android Studio 2.3.3 gradle build tools 2.3.3 annotation processor is enabled in android studio I tried the common solutions: remove my project from Android Studio recents invalidate cache and restart android studio import my project again into android studio (made sure that annotation processing is enabled before) Nothing helps. I have annotation processing working

Android studio: Parameter 'directory' is not a directory

有些话、适合烂在心里 提交于 2021-02-07 12:22:13
问题 When I try to build my project, I get such a mistake: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:dataBindingGenBaseClassesDebug'. > Parameter 'directory' is not a directory 回答1: From an answer to a similar question: Delete the .gradle directory (in the project base directory) Invalidate Caches and restart Android Studio. 来源: https://stackoverflow.com/questions/63372379/android-studio-parameter-directory-is-not-a-directory

what is generated and intermediates folders in build directory and why outputs folder is missing

*爱你&永不变心* 提交于 2021-02-06 15:15:38
问题 I'm building application with Android Studio and Gradle. When the build is finished the build folder contains the following folders: - assets - CordovaLib - build - src - build.gradle - gradle - src - com.my.package - CordovaApp - build.gradle - build - generated - intermediates - outputs //not displayed in android studio's project tree - tmp //not displayed in android studio's project tree 1) What are generated, intermediates and tpm folders? 2) Why aren't the outputs and tmp folder shown in

what is generated and intermediates folders in build directory and why outputs folder is missing

可紊 提交于 2021-02-06 15:14:32
问题 I'm building application with Android Studio and Gradle. When the build is finished the build folder contains the following folders: - assets - CordovaLib - build - src - build.gradle - gradle - src - com.my.package - CordovaApp - build.gradle - build - generated - intermediates - outputs //not displayed in android studio's project tree - tmp //not displayed in android studio's project tree 1) What are generated, intermediates and tpm folders? 2) Why aren't the outputs and tmp folder shown in

what is generated and intermediates folders in build directory and why outputs folder is missing

纵然是瞬间 提交于 2021-02-06 15:14:20
问题 I'm building application with Android Studio and Gradle. When the build is finished the build folder contains the following folders: - assets - CordovaLib - build - src - build.gradle - gradle - src - com.my.package - CordovaApp - build.gradle - build - generated - intermediates - outputs //not displayed in android studio's project tree - tmp //not displayed in android studio's project tree 1) What are generated, intermediates and tpm folders? 2) Why aren't the outputs and tmp folder shown in

Pass env variables to gradle.properties

强颜欢笑 提交于 2021-02-05 11:31:07
问题 I have a property set like this: url=localhost:3206 Is there a way to specifiy this like below instead: url=${hostname}:3206 回答1: I don't think gradle.properties supports interpolation. However, I would suggest an alternative means to accomplishing this: Have the following in your gradle.properties: hostname=localhost port=3206 Somewhere in your build.gradle, do the following: beforeEvaluate { ext.url = "$hostname:$port" } To configure the hostname or port, you have several options. I prefer