मैं jCenter करने के लिए एक पुस्तकालय ताकि मैं अपने प्रोजेक्ट के build.gradle फाइल करने के लिए कुछ प्लग जोड़ने के लिए आवश्यक करने के लिए जोड़ा जा रहा कस्टम 'साफ़' कार्य की घोषणा। हालांकि, मैं त्रुटि हो रही हैजब मानक Gradle जीवन चक्र प्लग इन का उपयोग की अनुमति नहीं है
Declaring custom 'clean' task when using the standard Gradle lifecycle plugins is not allowed.
मैं task clean
ब्लॉक देख सकते हैं और जब मैं इसे हटा त्रुटि दूर चला जाता है। मुझे लगता है कि मुझे बस इतना करना है, लेकिन क्या इससे पहले कुछ महत्वपूर्ण था? अगर मैं कभी-कभी प्लगइन्स हटा देता हूं और clean
ब्लॉक को वापस जोड़ना भूल जाता हूं, तो स्टोर में क्या गंभीर परिणाम हैं?
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
id "com.jfrog.bintray" version "1.7.3"
id "com.github.dcendents.android-maven" version "1.5"
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
This और this इस संतोषजनक ढंग से सवाल का जवाब नहीं दिया।
this link देखें। इसमें सबकुछ समझाया गया है। यकीन है कि यह मदद करेगा! –