build.gradle

Error: The file name must end with .xml or .png when using an mp3 file

回眸只為那壹抹淺笑 提交于 2019-11-28 14:09:55
I'm using Gradle 1.5.0 with Android Studio. Project syncs with Gradle without any issues, but when I run the app, I get the follow error message Error:Execution failed for task ':App:mergeDebugResources'. /Users/Zee/Repos/App/res/drawable/notification.mp3: Error: The filename must end with .xml or .png Using an mp3 file, so not sure what to do at this point. Any help is much appreciated. You can't put mp3 file in drawable. Drawable folder is for images. Put your mp3 file or any other format in raw folder. Raw folder can be found in res/raw If it doesn't exist then just create a raw folder in

Gradle eclipse plugin : Could not find method jcenter() for arguments [] on repository container. See error log for details

前提是你 提交于 2019-11-28 13:56:50
I am trying to import my gradle project into eclipse and I get the error Could not find method jcenter() for arguments [] on repository container. See error log for details Among other things, my build.gradle contains the following: buildscript { repositories { jcenter() } dependencies { classpath 'org.gradle.api.plugins:gradle-cargo-plugin:1.1' } } The eclipse log contains the following (posting only the tail for brevity): Caused by: org.gradle.api.internal.MissingMethodException: Could not find method jcenter() for arguments [] on repository container. at org.gradle.api.internal

AndroidStudio: What does 'debuggable' do?

[亡魂溺海] 提交于 2019-11-28 13:55:13
I would like to know exactly what the debuggable true statement does: // build.gradle android { buildTypes { debug { debuggable true } } } I am able to debug without it using the emulator (genymotion): the breakpoints work; the Log.d(...) statements output to the Android Monitor; Since the debuggable flag is inside the debug section, it seems redundant anyway. Shouldn't it be outside the buildTypes section, indicating to the ide that the debug buildtype should be used? It would also be nice to get some simple layperson general background understanding of the difference between the debug and

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

寵の児 提交于 2019-11-28 13:14:35
问题 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ы

Gradle: specify appropriate repo for dependency

☆樱花仙子☆ 提交于 2019-11-28 12:34:21
I have several repos and a lot of dependencies. It is looks like this in build.gradle: repositories { maven {url "A"} maven {url "B"} } dependencies { compile 'libA' compile 'libB' compile 'libC' } Is there is a way how can I specify that I will download libA from one repo (A) and libB and libC from another repo (B)? There is no way to associate a dependency with a repository. The repositories will always be searched in their declared order. As of Jan 2019 this is possible. Say you have a specific repo for oracle deps: maven { url 'https://artifactory.mycompany.com/somepath/oracle-binaries/'

Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException:..non-zero exit value 3

核能气质少年 提交于 2019-11-28 12:21:26
After Clean Project -> Rebuild Project my android project I am getting below error Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-7-oracle/bin/java'' finished with non-zero exit value 3 Gradle : apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.1" defaultConfig { applicationId "com.myapplicationname.app" minSdkVersion 15 targetSdkVersion 23

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

六月ゝ 毕业季﹏ 提交于 2019-11-28 12:16:40
问题 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

Jacoco offline instrumentation Gradle script

感情迁移 提交于 2019-11-28 11:18:22
I tried looking for Jacoco offline instrumentation gradle script snippets but couldn't find one. Is it possible to do Jacoco offline instrumentation through gradle scripts ? If yes...An example of it would be greats. Thanks. Here is an example of Gradle script that performs offline instrumentation using JaCoCo Ant Task: apply plugin: 'java' configurations { jacoco jacocoRuntime } dependencies { jacoco group: 'org.jacoco', name: 'org.jacoco.ant', version: '0.7.9', classifier: 'nodeps' jacocoRuntime group: 'org.jacoco', name: 'org.jacoco.agent', version: '0.7.9', classifier: 'runtime'

JavaFX Android Port - Google Play Services

空扰寡人 提交于 2019-11-28 10:31:48
问题 I have written a little game on JavaFX and ported it successfully to Android. Now I want to include some Google Ads. For this I created a PlatformService and AndroidPlatformProvider like in this example shown. I'm using the Gluon plugin for Netbeans I added this to my build.gradle file: repositories { def androidHome = System.getenv("ANDROID_HOME") maven { url "$androidHome/extras/android/m2repository/" } maven { url "$androidHome/extras/google/m2repository/"} } dependencies { compile

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

北战南征 提交于 2019-11-28 10:27:57
问题 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.