gradlew

Android Studio Build/Clean

冷暖自知 提交于 2019-11-28 06:45:59
In an attempt to compile external jars, I have to use the terminal and do a clean. However, when I go into the root directory of my project and execute gradlew clean I get the following message: -bash: gradlew: command not found Here's a screenshot of my application folder's home directory. Let me know if you need anything else, I'm not sure why this is happening. gradlew is not in your global path. To execute the 'clean' task (or any task for that matter) using the gradle wrapper (gradlew) in your project directory in your terminal, specify the current directory with the './': ./gradlew clean

Publish jar library to bintray using gradle

为君一笑 提交于 2019-11-28 05:38:24
问题 I'm trying to publish a jar library to bintray using Gradle. I have a package on my project which is "com.github.instagram". What I am trying to achieve is to build the jar file of this package and upload it to bintray. here are my configurations uploadArchives { repositories { bintrayMavenDeployer { username 'xxx' apiKey 'xxx' repoOwner 'xxx' repoName 'xxx' packageName 'xxx' description 'This is an example to simplifying bintray publishing' descUrl 'https://github.com/ysb33r/Gradle/blob

Can you deploy to a device via Gradle from the command line

与世无争的帅哥 提交于 2019-11-28 03:01:22
What the question says really - can you issue any commands directly to gradlew via the command line to build, package and deploy to a device? $ gradle installDebug This will push the debug build apk to device, but you have to manually start the application. Since you are using Gradle, you could simple add your own task in build.gradle task appStart(type: Exec, dependsOn: 'installDebug') { // linux commandLine 'adb', 'shell', 'am', 'start', '-n', 'com.example/.MyActivity' // windows // commandLine 'cmd', '/c', 'adb', 'shell', 'am', 'start', '-n', 'com.example/.MyActivity' } then call it in your

How to use gradle zip in local system without downloading when using gradle-wrapper

妖精的绣舞 提交于 2019-11-28 02:51:35
I'm trying to build a gradle project with gradle-wrapper ( gradlew ). When I build with ./gradlew build , it outputs text Downloading http://services.gradle.org/distributions/gradle-1.11-bin.zip And I already got gradle-1.11-bin.zip downloaded separately and I don't want to be downloading it again when I build. So, where shall I put gradle-1.11-bin.zip in my project or system so that I don't have to download again? gradle/wrapper/gradle-wrapper.properties is as following. distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists

Error with gradlew: /usr/bin/env: bash: No such file or directory

心不动则不痛 提交于 2019-11-27 11:29:05
问题 After committing my project's gradlew file from my Windows machine to the remote repo using Git, invoking gradlew on my Linux server failed with this message: /usr/bin/env: bash: No such file or directory What happened? 回答1: The problem's cause was that Git on Windows converted the line endings of gradlew from Unix style (LF) to Windows style (CRLF). You can turn off that automatic conversion using git config core.autocrlf false . Setting the line endings of gradlew back to Unix style fixed

Why are my Gradle builds dying with exit-code 137?

ぐ巨炮叔叔 提交于 2019-11-27 11:26:20
问题 I've been trying to compile and test a large project to use Gradle. The test run fine until they die unexpectedly. I dug around and resources said that this is due to a memory issue. If I reduce the number of tests in the suite, it runs fine. I increased the memory by 4x increased the debugging level but I still don't follow what causes this. Here's the horribly cryptic stacktrace. The last line (scroll right) shows the memory settings that I've defined. ... ... ... 1125 tests completed, 30

Difference between clean, gradlew clean

别说谁变了你拦得住时间么 提交于 2019-11-27 09:45:32
问题 What is the difference between the following statements when issued from a Android Studio Project's terminal : Android_Studio_Project_Path: ./gradlew clean Android_Studio_Project_Path: ./gradlew clean assembleDebug Android_Studio_Project_Path: ./gradlew clean :assembleDebug and normal Android Studio --> Build --> Clean. What would be the difference in the internal process. 回答1: ./gradlew clean Uses your project's gradle wrapper to execute your project's clean task. Usually, this just means

Gradle error: Write access is allowed from event dispatch thread only in Android Studio

淺唱寂寞╮ 提交于 2019-11-27 09:31:22
问题 After updating Android Studio to version 2.2 (on Windows 10) and somehow next morning I received such error when gradle built on any project: Write access is allowed from event dispatch thread only Despite that gradlew -build command worked and completed successfully. I tried typical Android dev's of WTF repairing set: clean build, invalidate caches, removing build folders, removing .gradle folder, tried different gradle settings, even reinstalling Android Studio and nothing helped. I've

Android Studio: “Use default gradle wrapper” vs. “Use customizable gradle wrapper”

会有一股神秘感。 提交于 2019-11-27 06:36:11
What exactly is the difference between Android Studio's Gradle options: Android Studio->Preferences->Gradle Use default gradle wrapper (recommended) and Use customizable gradle wrapper ? Background: I am working on an Android project in Android Studio and using a Gradle wrapper. However, when I use the Android Studio settings "Use customizable gradlew wrapper" every time my team members sync the Android Studio project using the gui command: they find the gradle/wrapper/gradle-wrapper.properties date being updated (and resulting in a extra diffs on the git repo). Switching to "Use default

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

两盒软妹~` 提交于 2019-11-27 06:19:52
I cleaned the whole project by deleting local directories like ~/.gradle , ~/.m2 ~./android and ~/workspace/project/.gradle and chosing File -> Invalidate Caches / Restart... in Android Studio. Now execution of the command ./gradlew leads to the following output: usr$ ./gradlew tasks Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain Needless to say, I deleted too much, the question is how can it be repaired again? Do you have any ideas how to fix this? gradlew is the gradle wrapper executable - batch script on windows and shell script elsewhere. If you include the