2015-11-24 5 views
12

मेरी Gradle हैमें एंड्रॉयड स्टूडियो 2.0 पूर्वावलोकन एप्लिकेशन लॉन्च नहीं किया जा सकता

// Top-level build file where you can add configuration options common to all sub-projects/modules. 

buildscript { 
    repositories { 
     jcenter() 
     maven { url 'https://maven.fabric.io/public' } 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.0.0-alpha1' 
     classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1' 
     } 
} 

allprojects { 
    repositories { 
     mavenCentral() 
     jcenter() 
     maven { 
      url 'https://maven.fabric.io/public' 
     } 
     maven { 
      url 'http://dl.bintray.com/amulyakhare/maven' 
     } 
    } 
} 

एप्लिकेशन Gradle

buildscript { 
    repositories { 
     maven { 
      url 'https://maven.fabric.io/public' 
     } 
    } 

    dependencies { 
     classpath 'io.fabric.tools:gradle:1.19.2' 
    } 
} 
apply plugin: 'com.android.application' 

repositories { 
    maven { url 'https://maven.fabric.io/public' } 
    maven { url "https://clojars.org/repo/"} 
    maven { url "https://s3.amazonaws.com/repo.commonsware.com" } 

} 

apply plugin: 'com.jakewharton.hugo' 
apply plugin: 'io.fabric' 


android { 
    compileSdkVersion 23 
    buildToolsVersion '23.0.2' 

    defaultConfig { 
     applicationId "***.***" 
     minSdkVersion 14 
     targetSdkVersion 22 
     versionCode 5 
     versionName "1.5" 
    } 

    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
    packagingOptions { 
     exclude 'META-INF/LICENSE.txt' 
     exclude 'META-INF/NOTICE.txt' 
    } 

    signingConfigs { 
     release { 
      storeFile file('../keystore.jks') 
      storePassword "***" 
      keyAlias '***' 
      keyPassword "***" 
     } 
    } 

    buildTypes { 
     debug { 
      debuggable true 
      zipAlignEnabled true 
      signingConfig signingConfigs.release 
      minifyEnabled false 
     } 
     release { 
      debuggable false 
      minifyEnabled false 
      signingConfig signingConfigs.release 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    compile 'com.parse.bolts:bolts-android:1.+' 
    compile 'com.parse:parsetwitterutils-android:1.10.3' 
    compile 'com.parse:parse-android:1.+' 
    compile 'jp.wasabeef:picasso-transformations:1.3.0' 
    compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.3.0' 
    compile 'com.android.support:appcompat-v7:23.1.1' 
    compile 'com.android.support:design:23.1.1' 
    compile 'com.squareup.retrofit:retrofit:1.9.0' 
    compile 'com.octo.android.robospice:robospice:1.4.14' 
    compile 'io.reactivex:rxjava:1.0.14' 
    compile 'io.reactivex:rxandroid:0.25.0' 
    compile 'de.greenrobot:eventbus:2.4.0' 
    compile 'com.github.snowdream.android.util:log:1.2.0' 
    compile 'com.jakewharton:butterknife:7.0.1' 
    compile('com.crashlytics.sdk.android:crashlytics:[email protected]') { 
     transitive = true; 
    } 
    compile('com.digits.sdk.android:digits:[email protected]') { 
     transitive = true; 
    } 
    /* compile 'frankiesardo:icepick:3.0.2' 
         provided 'frankiesardo:icepick-processor:3.0.2'*/ 
    compile 'org.parceler:parceler-api:1.0.1' 
    provided 'org.parceler:parceler:1.0.1' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile 'org.scribe:scribe:1.3.6' 
    compile 'com.android.support:support-v13:23.1.1' 
    compile 'com.facebook.android:facebook-android-sdk:4.1.0' 
    compile 'com.pushtorefresh.storio:content-resolver:1.0.1' 
    compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1' 
    compile 'com.pkmmte.view:circularimageview:1.1' 
    compile 'com.baoyz.pullrefreshlayout:library:1.0.1' 
    compile 'com.commonsware.cwac:merge:1.1.+'//adapger merger for listview with two adapters 
    compile 'com.google.android.gms:play-services-location:8.3.0' 
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4' 
} 

है जब मैं में एंड्रॉयड स्टूडियो 2.0 पूर्वावलोकन निम्न संदेश एप्लिकेशन को लॉन्च करने की कोशिश संदेश विंडो में है:

Information:Gradle tasks [:app:assembleDebug] 
:app:incrementalDebugBuildInfoGenerator 
:app:preBuild UP-TO-DATE 
:app:preDebugBuild 
:app:checkDebugManifest 
:app:preReleaseBuild UP-TO-DATE 
:app:prepareComAmulyakhareComAmulyakhareTextdrawable101Library UP-TO-DATE 
:app:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE 
:app:prepareComAndroidSupportDesign2311Library UP-TO-DATE 
:app:prepareComAndroidSupportRecyclerviewV72311Library UP-TO-DATE 
:app:prepareComAndroidSupportSupportV132311Library UP-TO-DATE 
:app:prepareComAndroidSupportSupportV42311Library UP-TO-DATE 
:app:prepareComBaoyzPullrefreshlayoutLibrary101Library UP-TO-DATE 
:app:prepareComCommonswareCwacMerge111Library UP-TO-DATE 
:app:prepareComCommonswareCwacSacklist102Library UP-TO-DATE 
:app:prepareComCrashlyticsSdkAndroidAnswers132Library UP-TO-DATE 
:app:prepareComCrashlyticsSdkAndroidBeta113Library UP-TO-DATE 
:app:prepareComCrashlyticsSdkAndroidCrashlytics252Library UP-TO-DATE 
:app:prepareComCrashlyticsSdkAndroidCrashlyticsCore235Library UP-TO-DATE 
:app:prepareComDigitsSdkAndroidDigits191Library UP-TO-DATE 
:app:prepareComFacebookAndroidFacebookAndroidSdk410Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesBase830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesBasement830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesLocation830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesMaps830Library UP-TO-DATE 
:app:prepareComJakewhartonHugoHugoRuntime121Library UP-TO-DATE 
:app:prepareComPkmmteViewCircularimageview11Library UP-TO-DATE 
:app:prepareComTwitterSdkAndroidTwitterCore161Library UP-TO-DATE 
:app:prepareIoFabricSdkAndroidFabric137Library UP-TO-DATE 
:app:prepareJpWasabeefPicassoTransformations130Library UP-TO-DATE 
:app:prepareDebugDependencies 
:app:compileDebugAidl UP-TO-DATE 
:app:compileDebugRenderscript UP-TO-DATE 
:app:generateDebugBuildConfig UP-TO-DATE 
:app:processDebugManifest 
:app:injectDebugBootstrap 
Instrumented adam.youpick.common.YouPickApp with fast deploy 
:app:generateDebugAssets UP-TO-DATE 
:app:mergeDebugAssets UP-TO-DATE 
:app:generateDebugResValues UP-TO-DATE 
:app:generateDebugResources UP-TO-DATE 
:app:mergeDebugResources UP-TO-DATE 
:app:crashlyticsGenerateResourcesDebug 
:app:processDebugResources 
:app:generateDebugSources 
:app:compileDebugJavaWithJavac 
Note: Some input files use or override a deprecated API. 
Note: Recompile with -Xlint:deprecation for details. 
Note: Some input files use unchecked or unsafe operations. 
Note: Recompile with -Xlint:unchecked for details. 
:app:compileDebugNdk UP-TO-DATE 
:app:compileDebugSources 
:app:fastDeployDebugExtractor 
:app:generateDebugInstantRunAppInfo 
:app:transformClassesWithInstantRunVerifierForDebug 
:app:transformClassesWithInstantRunForDebug 
IncrementalSupportVisitor Visiting adam/youpick/BuildConfig 
IncrementalSupportVisitor Visiting adam/youpick/FragmentStack 
... //HERE IS MANY ERRORS ABOUT "IncrementalSupportVisitor Visiting" 
IncrementalSupportVisitor Visiting adam/youpick/serviceLayer/network/api/yelp/model/YelpRequest 
:app:transformClassesWithInstant+restartDexForDebug 
:app:transformClasses_enhancedWithInstant+reloadDexForDebug 
:app:incrementalDebugSupportDex 
:app:transformClassesWithDexForDebug FAILED 
Error:Execution failed for task ':app:transformClassesWithDexForDebug'. 
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_66\bin\java.exe'' finished with non-zero exit value 2 
Information:BUILD FAILED 
Information:Total time: 3 mins 9.804 secs 
Information:1 error 
Information:0 warnings 
Information:See complete output in console 

अद्यतन:

लेकिन classpath 'com.android.tools.build:gradle:1.2.3' अनुप्रयोग के साथ सही ढंग से चलाता है

त्रुटि को हल करने के लिए: gradle:2.0.0-alpha1 साथ IncrementalSupportVisitor Visiting?

उत्तर

12
documentation से

:

Here are also some known issues that we are working on: Apps that are using legacy multi-dex (with minSdkVersion < 21), with a main dex file near the 65K method limit may not build. This would require reworking the app to make room in the main dex list by reducing the number of classes required in the main dex file.

यह "त्वरित रन" लग रहे हैं के साथ मल्टी-डेक्स पूर्व 21.

तो gradle:2.0.0-alpha1

+3

त्रुटि तब होती है भले ही आप बहु डेक्स प्रयोग नहीं करते। – jimmy0251

+0

@ jimmy0251 मुझे एक ही समस्या थी लेकिन पता चला कि मैं सीमा के करीब था और तत्काल दौड़ मुझे 65k सीमा से अधिक रख रहा था। सेटिंग्स में तत्काल रन को अक्षम करने से समस्या हल हो गई। – MobileSam

+1

मैं अल्फा -2 का उपयोग कर रहा था लेकिन अल्फा -3 के लिए अद्यतन प्रस्ताव का कारण बनता है – cutiko

0

का उपयोग नहीं करते मैं एक ही है काम नहीं करते इससे पहले त्रुटि, मैंने

targetSdkVersion = 23

अपडेट करके त्रुटि हल की

मैं भी

classpath 'com.android.tools.build:gradle:2.0.0-alpha5'

उपयोग कर रहा हूँ Android Studio Preview 5

0

साथ आप defaultConfig

defaultConfig { 
multiDexEnabled true 
} 
0

में multiDexEnabled सच में जोड़ सकते हैं मैं अपने Android स्टूडियो 2.0 संस्करण के साथ एक ही समस्या थी और मुझे लगता है कि तय ग्रैडल प्लगइन को नवीनतम संस्करण में अपडेट करके। यहां आप नवीनतम संस्करण

nstant रन को एंड्रॉइड ग्रैडल प्लगइन 2.0.0 या बाद में निर्मित परियोजनाओं के लिए डिफॉल्ट रूप से सक्षम कर सकते हैं। Gradle प्लगइन का नवीनतम संस्करण के साथ एक मौजूदा परियोजना को अद्यतन करने के सेटिंग संवाद करने के लिए जाना:

On Mac, click Android Studio → Preferences 

On Windows and Linux, click File → Settings 

सेटिंग्स/प्राथमिकताएं संवाद में, बनाने के, निष्पादन, तैनाती → त्वरित भागो जाओ। अद्यतन परियोजना लिंक पर क्लिक करें। संकेत मिलने पर, ठीक क्लिक करें।

enter image description here

संबंधित मुद्दे

 संबंधित मुद्दे