build.gradle

Failure on build with Gradle on command line with an android studio project : Xlint error

久未见 提交于 2019-11-29 19:50:18
When I try to build an android project with gradle with this command : > gradlew clean build assembleRelease It gives me this error : Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. I can build this project and make the APK in Studio. Is there a way to configure Gradle to make a compilation ignoring Xlint notifications ? OR, can I use other parameters, to make the release from command-line with gradle/gradlew ? shakalaca It

How to use existing testng suite xml file and set thread counts programmatically?

感情迁移 提交于 2019-11-29 18:16:43
all. I have existing xml file testng suite. I want to use it in gradle task and set thread count programmatically <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <suite name="UiTests"> <test name="UiTests" preserve-order="true"> <packages> <package name="tests.web"> <exclude name="tests.web.performance"/> </package> </packages> </test> </suite> In gradle task I use useTestNG method and set threadCount parameter useTestNG{ suites("src/testы/suites/UiTests.xml") threadCount 2 setParallel("methods") } But it doesn't works - count of threads get

Build fails with app:transformClassesAndResourcesWithProguardForRelease on upgrading gradle version to 2.3.3

╄→гoц情女王★ 提交于 2019-11-29 17:41:00
I have my gradle to 2.3.3. It is working fine in debug mode. But when i am running this in release mode with proguard enabled, It is thorwing this exception Warning:Exception while processing task java.io.IOException: java.lang.NullPointerException Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForProdRelease'. I have checked many solution on stackoverflow like same problem as mine but this solution didn't work On running gradlew assembleRelease --stacktrace command in terminal org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app

how to skip placeholder value if not supplied in properties file in spring boot?

人盡茶涼 提交于 2019-11-29 17:01:39
I have a spring boot application that uses gradle. I have configured gradle to inject build parameters into application.properties. Here is my gradle snippet. processResources { expand project.properties } In the application.properties , I have following values service.name=${name} service.version=${version} name and version are properties of gradle that will be injected. when I run ./gradlew bootRun or ./gradlew build, I see the application.properties file being replaced with correct values. But, when I start the using springBoot Runner from Intellij, I get the following error. org

Could not find aapt2-proto.jar (com.android.tools.build:aapt2-proto:0.3.1)

爱⌒轻易说出口 提交于 2019-11-29 16:45:06
I'm using Android Studio to work with tomahawk-android project, so i cloned the project using git , directly into the Android Studio , where it fails to build, saying; Could not find aapt2-proto.jar (com.android.tools.build:aapt2-proto:0.3.1). Searched in the following locations: https://jcenter.bintray.com/com/android/tools/build/aapt2-proto/0.3.1/aapt2-proto-0.3.1.jar build.gradle: apply plugin: "com.android.application" android { implementationSdkVersion 23 buildToolsVersion '23.0.3' defaultConfig { minSdkVersion 15 targetSdkVersion 22 renderscriptTargetApi 20 renderscriptSupportModeEnabled

How to add java compiler options when compiling with Android Gradle Plugin?

左心房为你撑大大i 提交于 2019-11-29 16:36:10
问题 I have a build.gradle file with dependencies { classpath 'com.android.tools.build:gradle:0.13.3'} and apply plugin: 'com.android.application' . When I do a debug build I get: gradle clean assembleDebug :myapp:preBuild (...) :myapp:compileDebugJava Note: C:\path\to\MyClass.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. :myapp:preDexDebug (...) :myapp:assembleDebug BUILD SUCCESSFUL How can I add the -Xlint:unchecked to the underlying task? Gradle

How to add custom dependencies automatically in android for ever a new project is created?

送分小仙女□ 提交于 2019-11-29 15:21:01
问题 I use these libraries usually, I want a way to include them in any new project I create. compile 'com.android.support:recyclerview-v7:25.1.1' compile 'com.squareup.picasso:picasso:2.5.2' compile 'com.jakewharton:butterknife:8.5.1' apt 'com.jakewharton:butterknife-compiler:8.5.0' compile 'com.squareup.okhttp3:okhttp:3.6.0' compile 'com.facebook.stetho:stetho-okhttp3:1.4.2' What should I do? 回答1: You can find your App level (In which you can add your dependencies as shown below) Gradle template

Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug' android studio

有些话、适合烂在心里 提交于 2019-11-29 14:43:46
I create a game on buildbox I export the project but I can't start the game on android studio My problem is that I can't run the application or produce an apk file someone can help me please. The error Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'. java.io.IOException: Can't write [C:\Users\youne\Desktop\android2\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [C:\Users\youne.gradle\caches\transforms-1\files-1.1\support-core-ui-25.2.0.aar\9adfc8649fc899fbc5e371e8bc1c399a\jars\classes.jar(;;;;;;**.class)] (Duplicate zip entry [classes

zip.ZipException: duplicate entry: annotations/Beta.class

一个人想着一个人 提交于 2019-11-29 14:28:48
I have been struggling for more that a day to fix the duplicate entry given when running my android project. Error: Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.> java.util.zip.ZipException: duplicate entry: com/google/common/annotations/Beta.class I've tried to exclude various modules as well as enable multiDex, and have hit a wall, please help me solve this problem: part of code: compile(project(path: ':k_endpoint', configuration: 'android-endpoints')) { exclude(group: 'com.google.guava', module: 'guava-jdk5') exclude(group: 'com.android.support', module: 'support

Gradle version 1.10 is required. Current version is 2.2.1. in android

爷,独闯天下 提交于 2019-11-29 14:26:13
问题 I had an Android project built with Android Studio and trying to import and run it on my Android Studio but facing the below error when trying to Sync the project Failed to sync Gradle project 'project-android' Error:Gradle version 1.10 is required. Current version is 2.2.1. If using the gradle wrapper, try editing the distributionUrl in /Users/username/apps/android/project-android/gradle/wrapper/gradle-wrapper.properties to gradle-1.10-all.zip. Please fix the project's Gradle settings in