Please any one help me. This is the error: Error:No such property: nexusUsername for class: org.gradle.api.publication.maven.internal.ant.DefaultGroovyMavenDeployer
stacktrace
Information:Gradle tasks [:app:compileDebugJava]
Information:FAILURE: Build failed with an exception.
Information:* What went wrong:
Information:A problem occurred configuring project ':app'.
Information:> A problem occurred configuring project':libraries:HoloColorPicker- master'.
Information: > No such property: nexusUsername for class: org.gradle.api.publication.maven.internal.ant.DefaultGroovyMavenDeployer
Information:* Try:
Information:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Information:0 errors
settings.gradle
include ':app'
include ':libraries:HoloColorPicker-master'
build.gradle
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion '19.0.3'
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:19.+'
compile project(':libraries:HoloColorPicker-master')
}
Holopicker build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
}
def isReleaseBuild() {
return version.contains("SNAPSHOT") == false
}
allprojects {
version = VERSION_NAME
group = GROUP
repositories {
mavenCentral()
}
}
apply plugin: 'android-library'
android {
compileSdkVersion 19
buildToolsVersion "18.1.1"
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
apply from: 'maven_push.gradle'
If Studio doesn't start after an upgrade, the problem may be due to an invalid Android Studio configuration imported from a previous version of Android Studio or an incompatible plugin.
How do I fix launching Studio error? Open Start menu > computer > System Properties > Advanced System Properties. In the Advanced tab > Environment Variables, add a new system variable JAVA_HOME that points to your JDK folder, for example, C:\Program Files\Java\jdk1. 7.0_21.
Using F2. In addition to what the other answers say, you can find errors by pressing F2 or Shift + F2 . This is useful when you can't see the where the red indicator is on the side bar.
The HoloColorPicker
library has gradle tasks for uploading to the Maven repository that require some properties to be set for the gradle environment (usually in gradle.properties
).
The easiest solution would be to remove the line from build.gradle
:
apply from: 'maven_push.gradle'
I have not try the solution given by myanimal, but i have try out another thing which works with all the project which have similar issue during importing it. myanimal's solution is related to only one project, and for every project you should have to follow same thing.
But with my solution you might have to do it only once for all future projects.
For my solution do like below:
- create a file ~/.gradle/gradle.properties with the following contents:
nexusUsername= nexusPassword=
Hope this will help you more for all projects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With