gradlew

Cannot change strategy of configuration ':testCompile' after it has been resolved

若如初见. 提交于 2021-02-11 15:43:58
问题 when I upgraded my google-services version to 4.1.0 and gms:play-services-maps:16.0.0 getting below error during building the project. A problem occurred evaluating root project ':app'. > Failed to apply plugin [id 'com.google.gms.google-services'] > Cannot change strategy of configuration ':testCompile' after it has been resolved. Below is my build.gradle buildscript { repositories { flatDir { dirs './lib' } google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.0.1'

How to set Gradle environment variables?

人走茶凉 提交于 2021-02-08 15:18:06
问题 I'm trying to execute a Gradle command-line task -setupDecompWorkspace to set up Minecraft Forge, but the task gets stuck on decompileMC. I've tried the first solution from this issue, but it didn't work. The second solution suggest setting the GRADLE_OPTS environment variable to -Xmx2G . I don't exactly know how to do this. After searching online for a couple of hours I am still found with no answer. Even the official Gradle documentation doesn't help. Do I need to declare the variable in

How to set Gradle environment variables?

为君一笑 提交于 2021-02-08 15:17:08
问题 I'm trying to execute a Gradle command-line task -setupDecompWorkspace to set up Minecraft Forge, but the task gets stuck on decompileMC. I've tried the first solution from this issue, but it didn't work. The second solution suggest setting the GRADLE_OPTS environment variable to -Xmx2G . I don't exactly know how to do this. After searching online for a couple of hours I am still found with no answer. Even the official Gradle documentation doesn't help. Do I need to declare the variable in

How to set Gradle environment variables?

大兔子大兔子 提交于 2021-02-08 15:16:26
问题 I'm trying to execute a Gradle command-line task -setupDecompWorkspace to set up Minecraft Forge, but the task gets stuck on decompileMC. I've tried the first solution from this issue, but it didn't work. The second solution suggest setting the GRADLE_OPTS environment variable to -Xmx2G . I don't exactly know how to do this. After searching online for a couple of hours I am still found with no answer. Even the official Gradle documentation doesn't help. Do I need to declare the variable in

./gradlew test connectedAndroidTest erases my getFilesDir() folder

你说的曾经没有我的故事 提交于 2021-02-08 14:13:41
问题 I'm writing a Room database into my getFilesDir() folder. (Writing the database onto the removable SD card is apparently going to require some major research!) When I manually run my app, I want to write some records and leave them in the database, so I don't need to keep writing them again. When I run my tests, I switch the database name from "*.dat" to "_test.dat" (think Ruby on Rails's or Django's "environments" system). The tests are free to erase records. This system works when I

./gradlew test connectedAndroidTest erases my getFilesDir() folder

帅比萌擦擦* 提交于 2021-02-08 14:13:32
问题 I'm writing a Room database into my getFilesDir() folder. (Writing the database onto the removable SD card is apparently going to require some major research!) When I manually run my app, I want to write some records and leave them in the database, so I don't need to keep writing them again. When I run my tests, I switch the database name from "*.dat" to "_test.dat" (think Ruby on Rails's or Django's "environments" system). The tests are free to erase records. This system works when I

Android: Could not find or load main class org.gradle.wrapper.GradleWrapperMain

ⅰ亾dé卋堺 提交于 2021-02-08 13:15:22
问题 I am trying to build my project on GitLab CI but unfortunately for me I keep getting this error inside the runner: Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain Now I know there is something wrong with my environment but I just cant get my mind wrapped around the problem. I searched on the web and I found I needed to update my .gitignore file and I did here it is: ### Java ### *.class ### Android ### *.apk *.ap_ ### Package files ### *.war *.ear *.aar ###

duplicate entry android support v4 in serviceinfoversion impl.class

纵饮孤独 提交于 2021-02-08 08:16:24
问题 i have this error : Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl.class on this build.gradle app : apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "com.mtma.mytripmyadventure"

duplicate entry android support v4 in serviceinfoversion impl.class

流过昼夜 提交于 2021-02-08 08:16:20
问题 i have this error : Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl.class on this build.gradle app : apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "com.mtma.mytripmyadventure"

Create Gradle Tasks that executes other gradle task with parameters

▼魔方 西西 提交于 2021-02-08 05:15:15
问题 I use this gradle command to execute my UI-tests: ./gradlew connectedDebugAndroidTest -PUiTest I want to define a custom gradle task that executes my UI-tests, so I could this: task runUiTests() { dependsOn("connectedDebugAndroidTest") } How can I pass the parameter -PUiTest in my custom gradle task to the connectedDebugAndroidTest task? 来源: https://stackoverflow.com/questions/59284240/create-gradle-tasks-that-executes-other-gradle-task-with-parameters