Sorunun nasıl adlandırılacağına emin olamadım benimle.Android Studio 2.0 Gradle Bug
İki makinede çalışıyorum, bilgisayarım ve Mac'im. Şu anda tüm yeni özellikleri almak için PC'mdeki Android Studio 2.0 sürümüne geçtim ve bu bir karmaşa. Yardıma ihtiyacım var.
Öyleyse, uygulamayı çalıştırmaya çalıştığımda gradle derlemesi başarısız oluyor. Bu iletisiyle başarısız olur:
Executing tasks: [:app:clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:assembleDebug]
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:app:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2320Library
:app:prepareComAndroidSupportAppcompatV72320Library
:app:prepareComAndroidSupportDesign2320Library
:app:prepareComAndroidSupportRecyclerviewV72320Library
:app:prepareComAndroidSupportSupportV42320Library
:app:prepareComAndroidSupportSupportVectorDrawable2320Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources
:app:mergeDebugResources
:app:processDebugManifest
:app:processDebugResources
:app:generateDebugSources
:app:mockableAndroidJar UP-TO-DATE
:app:preDebugUnitTestBuild UP-TO-DATE
:app:prepareDebugUnitTestDependencies
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl
:app:processDebugAndroidTestManifest
:app:compileDebugAndroidTestRenderscript
:app:generateDebugAndroidTestBuildConfig
:app:generateDebugAndroidTestAssets UP-TO-DATE
:app:mergeDebugAndroidTestAssets
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources
:app:mergeDebugAndroidTestResources
:app:processDebugAndroidTestResources
:app:generateDebugAndroidTestSources
:app:compileDebugJavaWithJavac
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:buildInfoDebugLoader
:app:transformClassesWithExtractJarsForDebug
:app:transformClassesWithInstantRunVerifierForDebug
:app:transformClassesWithJavaResourcesVerifierForDebug
:app:mergeDebugJniLibFolders
:app:transformNative_libsWithMergeJniLibsForDebug
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/BCKEY.SF
File1: C:\Users\Andy\.gradle\caches\modules-2\files-2.1\org.bouncycastle\bcpkix-jdk15on\1.51\6c8c1f61bf27a09f9b1a8abc201523669bba9597\bcpkix-jdk15on-1.51.jar
File2: C:\Users\Andy\.gradle\caches\modules-2\files-2.1\org.bouncycastle\bcprov-jdk15on\1.51\9ab8afcc2842d5ef06eb775a0a2b12783b99aa80\bcprov-jdk15on-1.51.jar
- Dene: --stacktrace seçeneğiyle Çalıştır yığın izleme almak için. Daha fazla günlük çıkışı elde etmek için --info veya --debug seçeneği ile çalıştırın.
YAPI
Toplam süre
BAŞARISIZ: 15,114 sn İştebenim bağımlılıkları listesidir
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.google.code.gson:gson:2.5'
compile 'com.hierynomus:sshj:0.15.0'
compile 'joda-time:joda-time:2.9.1'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'com.android.support:support-v4:23.2.0'
compile 'com.android.support:design:23.2.0'
}
Şimdi garip bir şey olduğunu ben tam olarak aynı kaynak kodu çalıştırırsanız Mac'im iyi. Peki neler oluyor? Bu v2.0 ile bir hata mıdır, ama olası değil gibi görünüyor.
Daha fazla bilgiye ihtiyacınız varsa bana bildirin!
Teşekkür
Andy
Lütfen yalnızca tüm satırları değil, tüm Gradle konsol çıktısını gönderin. – CommonsWare
@CommonsWare tamamlandı – Andy
Tamam, iki ayrı Bouncy Castle JARs dosyasından, çift dosyaları var. Yakın zamanda yeniden paketlenmedikçe, Android'in Android uygulamaları için de Bouncy Castle'ın tavsiye edilmemesi gerekmiyor. Eskiden [Spongy Castle] 'ı kullanmanız gerekiyordu (https://rtyley.github.io/spongycastle/). İlk olarak, bu problemi bir yan etki olarak ortaya çıkarabileceğine odaklanacağım. Aksi halde, bu dosyanın yalnızca bir kopyasını almak için bir hariç tutma kuralı belirleyin. – CommonsWare