के बाद मैंने संस्करण 3 में एंड्रॉइड स्टूडियो अपडेट किया है और अब त्रुटियों के बिना पहले संकलित मेरे प्रोजेक्ट को संकलित करने में असमर्थ लगता है।कॉमन्स-लॉगिंग उन कक्षाओं को परिभाषित करता है जो एंड्रॉइड द्वारा प्रदान की जाने वाली कक्षाओं के साथ संघर्ष करते हैं जो एंड्रॉइड स्टूडियो अपडेट
त्रुटि संदेश का पालन है
Error:Error: commons-logging defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]
निर्भरता
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:27.0.0'
compile 'com.android.support:design:27.0.0'
compile 'com.google.api-client:google-api-client-android:1.23.0' exclude module: 'httpclient'
compile 'com.google.http-client:google-http-client-gson:1.23.0' exclude module: 'httpclient'
compile 'com.google.firebase:firebase-core:11.4.2'
}
हैं और त्रुटि तो क्यों यह नहीं है मैं पहले से ही exclude module: 'httpclient'
का उपयोग द्वारा
compile 'com.google.api-client:google-api-client-android:1.23.0' exclude module: 'httpclient'
compile 'com.google.http-client:google-http-client-gson:1.23.0' exclude module: 'httpclient'
वजह से लगता है संकलन? क्या यह एंड्रॉइड स्टूडियो 3 और \ या com.android.tools.build:gradle:3.0.0
प्लगइन शामिल है या मुझे कुछ याद आ रहा है? पिछले संस्करण के साथ बिल्कुल एक ही परियोजना को संकलित करने में कोई समस्या नहीं है।
कोड निम्नलिखित नीचे जोड़ने
async-http
साथ जारी रखना चाहते हैं "तो क्यों यह संकलन नहीं करता है?" - त्रुटि के आधार पर आपकी समस्या 'कॉमन्स-लॉगिंग' के साथ है। शायद उन 'com.google' निर्भरताओं के नए संस्करण हैं जिनका उपयोग आप करना चाहिए। – CommonsWare@CommonsWareI को कोई नई लाइब्रेरी नहीं मिली है ये संस्करण नवीनतम हैं 20177 रिलीज – AndreaF
क्या आपके पास libs फ़ोल्डर में एक ही जार हैं? –