build.gradle

How can I run kotlintest tests with gradle?

爱⌒轻易说出口 提交于 2019-12-07 02:01:12
问题 The kotlintest tests run perfectly fine when started from Intellij, but when I try to run them with the gradle test task command, only my regular JUnit tests are found and run. The kotlintest code: import io.kotlintest.matchers.shouldBe import io.kotlintest.specs.StringSpec class HelloKotlinTest : StringSpec() { init { println("Start Kotlin UnitTest") "length should return size of string" { "hello".length shouldBe 5 } } } build.gradle: apply plugin: 'org.junit.platform.gradle.plugin'

Error Annotation Processors must be explicitly declared now

余生颓废 提交于 2019-12-07 01:56:55
问题 Suddenly i got an error in the execution of the app. I know that this qustion was already asked here: Annotation processors must be explicitly declared now However the solution don't answer the problem :( this is my build.gradle apply plugin: 'com.android.application' apply plugin: 'kotlin-android' android { compileSdkVersion 26 buildToolsVersion '27.0.0' aaptOptions { cruncherEnabled = true } defaultConfig { applicationId "com.freelance.crdzbird_dev.clarobadge" minSdkVersion 19

Android Gradle's dependency cache may be corrupt and gradle build not working

╄→гoц情女王★ 提交于 2019-12-07 01:38:42
问题 I am trying to import this project, even I tried to import other few projects too, I am getting below error. https://github.com/ashdavies/data-binding I have spent my 5 hours on it, even I tried many solutions on google but nothing gonna worked for me. I tried following solutions, nothing worked. 1) delete .gradle directory 2) Restart IDE, 3) I tested with com.android.tools.build:gradle-experimental:0.7.0-alpha1 I am frustrated because of this Gradle and these issues. Gradle Version : Gradle

Gradle Error in Android Studio: Plugin with id 'com.android.library' not found

岁酱吖の 提交于 2019-12-07 00:02:52
问题 When I am trying to Build an Android Library Project in Android Studio, I am getting the following Gradle error: Gradle sync failed: Plugin with id 'com.android.library' not found. I am pretty new to Gradle and this is very confusing for me. Why is this happening? The build.gradle file is as follows: apply plugin: 'com.android.library' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { minSdkVersion 8 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes {

What is “platformAttrExtractor” in Android Task Execution?

这一生的挚爱 提交于 2019-12-06 23:32:19
问题 I profile my build follwings instruction in Android: gradlew --profile --recompile-scripts --offline --rerun-tasks assembleFlavorDebug I found "UI:platformAttrExtractor" takes a long time, please see the screenshot. I don't understand what "platformAttrExtractor" is and how can I remove it to save build time? 回答1: I have the sample "problem". What I noticed is that by specifying the --offline command line option for gradle, build time (and specifically the time taken by the

No cached version of com.android.tools.build:gradle:1.2.3 available for offline mode

橙三吉。 提交于 2019-12-06 23:32:06
问题 I installed JetBrains IDEA 15.0.2 with android support on my computer that is disconnected from Internet. After that the project sync give an error that gradle is not existed, so I solve the problem by downloading gradle 2.2.1 and extracting it in its corresponding position But after that a new sync error occurs that say "No cached version of com.android.tools.build:gradle:1.2.3 available for offline mode" How can I solve error, at the same time keeping my conputer disconnected from Internet

How to make gradle build in android project faster?

时间秒杀一切 提交于 2019-12-06 20:28:27
Now i have a project. When i build it with ant, it takes only 40 seconds. But when i build it with gradle, it takes me 3 minutes or 4 minutes, which is really to much for me. How can i fasten my gradle build? It can help you if you run Gradle in daemon mode - https://twitter.com/timbray/status/512368955516657664 If you have multiple cores try gradle --daemon --parallel build , otherwise if you lack multiple cores try gradle --daemon --parallel-threads <number of threads you want to spawn> build . I saw a speed improvement of 200% after the first invocation. 来源: https://stackoverflow.com

expected reference but got (raw string) @+android:style/Animation.Translucent

…衆ロ難τιáo~ 提交于 2019-12-06 19:55:27
when I update the as version from 2.3 to 3.0 and compile the same project,there are some errors.How to solve the problem?thks. AGPBI:{ "kind":"error", "text":"error: expected reference but got (raw string) @+android:style/Animation.Translucent.", "sources":[ { "file":"/home/.../android/.../app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml", "position":{ "startLine":533 } } ], "original":"", "tool":"AAPT" }AGPBI:{ "kind":"error", "text":"error: expected reference but got (raw string) @+android:style/Animation.Translucent.", "sources":[ { "file":"/home/...

Could not find com.google.android.gms:play-services:7.3.0

馋奶兔 提交于 2019-12-06 18:33:08
问题 I have this log from Android Studio gradle: Error:A problem occurred configuring project ':ParseStarterProject'. > Could not resolve all dependencies for configuration ':ParseStarterProject:_debugCompile'. > Could not find com.google.android.gms:play-services:7.5.0. Searched in the following locations: https://repo1.maven.org/maven2/com/google/android/gms/play-services/7.5.0/play-services-7.5.0.pom https://repo1.maven.org/maven2/com/google/android/gms/play-services/7.5.0/play-services-7.5.0

Could not find method classpath() for arguments [com.google.gms:google-services:3.0.0]

与世无争的帅哥 提交于 2019-12-06 17:54:14
问题 I am getting this error while adding "com.google.gms:google-services:3.0.0" this script in my build.gradle dependency. 回答1: Apply this in build.gradle(Project: your project name) where tools.build:gradle is present and not in build.gradle(Module: app) buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.1.2' classpath 'com.google.gms:google-services:3.0.0' } } In build.gradle(Module: app) outside dependencies add this: apply plugin: 'com.google