build.gradle

New error after update to gradle-tool to 3.1.0-beta3 or 3.2.0-alpha03

五迷三道 提交于 2019-12-21 11:27:45
问题 Just a normal project with "prod" and "mock" flavors in app/build.gradle: sourceSets { main.java.srcDirs += "blabla bla" test.java.srcDirs += "blabla bla" androidTest.java.srcDirs += "blabla bla" prodDebug.java.srcDirs += "blabla bla" mockDebug.java.srcDirs += "blabla bla" prod.java.srcDirs += "blabla bla" testProd.java.srcDirs += "blabla bla" androidTestProd.java.srcDirs += "blabla bla" mock.java.srcDirs += "blabla bla" testMock.java.srcDirs += "blabla bla" androidTestMock.java.srcDirs +=

New error after update to gradle-tool to 3.1.0-beta3 or 3.2.0-alpha03

徘徊边缘 提交于 2019-12-21 11:27:42
问题 Just a normal project with "prod" and "mock" flavors in app/build.gradle: sourceSets { main.java.srcDirs += "blabla bla" test.java.srcDirs += "blabla bla" androidTest.java.srcDirs += "blabla bla" prodDebug.java.srcDirs += "blabla bla" mockDebug.java.srcDirs += "blabla bla" prod.java.srcDirs += "blabla bla" testProd.java.srcDirs += "blabla bla" androidTestProd.java.srcDirs += "blabla bla" mock.java.srcDirs += "blabla bla" testMock.java.srcDirs += "blabla bla" androidTestMock.java.srcDirs +=

Android Failed looking up window with support version 27.0.0

心已入冬 提交于 2019-12-21 07:53:57
问题 After the update of supportVersion to 27.0.0 ONLY on Android 5.0.2 the app crash with this stacktrace: W/WindowManager: Failed looking up window java.lang.IllegalArgumentException: Requested window android.view.ViewRootImpl$W@f004691 does not exist at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8426) at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8417) at com.android.server.wm.WindowManagerService

Generate Checkstyle HTML report with Gradle

送分小仙女□ 提交于 2019-12-21 06:58:34
问题 I'd like to get the output of running Checkstyle via Gradle as an HTML report. I've found nothing in the Checkstyle plugin documentation. I've added the following to my build.gradle file. checkstyleTask { reports { html { destination "build/reports/checkstyle.html" } } } but this yielded What went wrong: A problem occurred evaluating root project 'MyProject'. Could not find method checkstyleTask() for arguments [build_1vu33nc0ekgtoo19jt e86o8o42$_run_closure8@1d8ee20] on root project

How to find google play service version in Android Studio?

六月ゝ 毕业季﹏ 提交于 2019-12-21 06:57:55
问题 I am trying to use google play services for location purposes. Therefore I wanted to add google play services to my app. In build.gradle dependincies I added following line. compile 'com.google.android.gms:play-services:9.0.1' However it gives following error Error:(25, 13) Failed to resolve: com.google.android.gms:play-services:9.0.1 I couldnt find which version of Google play services installed. In SDK Tools tab it says version 30. I've tried following line too but it also gave same error

How to set checkstyle configuration from Gradle in IDEA

岁酱吖の 提交于 2019-12-21 05:31:27
问题 I am using the Checkstyle plugin in IDEA. I want to set up different checkstyle configurations to my different modules. I am using gradle as build tool-version 4- and I want to write a task that modifies the corresponding .iml files of the modules. Any idea how to do that? My very first attempt in modifying the iml file looking over here apply plugin: 'idea' task setCheckStylePluginSettings { group = "Idea" description = "Copies CheckStyle plugin settings to Idea workspace." println "Step 1."

Gradle: Building a modularized library that is compatible with Java 8

送分小仙女□ 提交于 2019-12-21 05:12:15
问题 So Java 9 is there, soon to be followed by Java 10. Time we should make our libraries ready for use in Java 9 projects. I did it in the following way: provide a module-info.java added the (experimental) jigsaw plugin in build.gradle Manually made changes according to the guide on the gradle site instead of using the jigsaw plugin. So far, both approaches work fine, and I can use the generated Jar in Java 9 projects. The problem is, the resulting Jar is not compatible with Java 8 although I

How to set proxy server for gradle?

╄→гoц情女王★ 提交于 2019-12-21 04:46:11
问题 I need to set a proxy server to be able to use gradle from my company's network to download project dependencies.I tried setting the proxy for shell, but it didn't work, so i assume it is because of the commands, gradle using to download these dependencies, does not use http_proxy environment variable. Which commands (like wget , curl ) does gradle use when downloading project dependencies? How can i check these commands? I tried both --info and --debug options, but it only says for each file

Problems including Apache HttpComponents in Android Gradle project

情到浓时终转凉″ 提交于 2019-12-21 04:21:07
问题 I try to include httpmime in my application using the build.gradle file, and everything compiles fine. Instead, when the application tries to actually use the MultipartEntityBuilder class, there are a bunch of WARN level messages on the log saying that there are problems. Here's the excerpt from my build.gradle for the dependency: compile('org.apache.httpcomponents:httpmime:4.+') { exclude module: "httpclient" } Here are the errors: 10-09 13:39:37.367 2409-2426/com.company.app W/dalvikvm﹕ VFY

Error: failed to find target with hash string 'android-21'

女生的网名这么多〃 提交于 2019-12-21 03:43:06
问题 I want to change my compileSdkVersion from 23 to 21.So I have made following changes in the build.gradle but I am getting following error.How can I resolve this? failed to find target with hash string 'android-21' apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig { applicationId "com.example.shalabh.fly" minSdkVersion 14 targetSdkVersion 21 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles