2016-04-08 21 views
6

私は最近Android Studioを1.5から2.0にアップグレードしました。私のアプリはAndroid 1.5上でうまく構築されて実行されます。私はスマートフォンでアプリを実行しようとすると、今、それは私に、このエラーを与える:1.5からアップグレードした後、Android Studio 2.0でアプリケーションが実行されない

Error:Execution failed for task ':app:transformClassesWithInstantRunForDebug'. 
> 24 

のAndroidメーカー2.0、メッセージボックスの上に私のプロジェクトを開くと、バージョン2への私のGradleをアップグレードするために私に言って、登場し、そのやった。なぜこのエラーが出るのかわかりません。

Executing tasks: [clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:compileDebugSources, :app:compileDebugUnitTestSources, :app:compileDebugAndroidTestSources] 
Configuration on demand is an incubating feature. 
Incremental java compilation is an incubating feature. 
:clean UP-TO-DATE 
:app:clean 
:app:preBuild UP-TO-DATE 
:app:preDebugBuild UP-TO-DATE 
:app:checkDebugManifest 
:app:preReleaseBuild UP-TO-DATE 
:app:prepareComAndroidSupportAnimatedVectorDrawable2321Library 
:app:prepareComAndroidSupportAppcompatV72321Library 
:app:prepareComAndroidSupportCardviewV72321Library 
:app:prepareComAndroidSupportDesign2321Library 
:app:prepareComAndroidSupportMediarouterV72300Library 
:app:prepareComAndroidSupportRecyclerviewV72321Library 
:app:prepareComAndroidSupportSupportV42321Library 
:app:prepareComAndroidSupportSupportVectorDrawable2321Library 
:app:prepareComGoogleAndroidGmsPlayServices840Library 
:app:prepareComGoogleAndroidGmsPlayServicesAds840Library 
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics840Library 
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing840Library 
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite840Library 
:app:prepareComGoogleAndroidGmsPlayServicesAppstate840Library 
:app:prepareComGoogleAndroidGmsPlayServicesAuth840Library 
:app:prepareComGoogleAndroidGmsPlayServicesBase840Library 
:app:prepareComGoogleAndroidGmsPlayServicesBasement840Library 
:app:prepareComGoogleAndroidGmsPlayServicesCast840Library 
:app:prepareComGoogleAndroidGmsPlayServicesDrive840Library 
:app:prepareComGoogleAndroidGmsPlayServicesFitness840Library 
:app:prepareComGoogleAndroidGmsPlayServicesGames840Library 
:app:prepareComGoogleAndroidGmsPlayServicesGcm840Library 
:app:prepareComGoogleAndroidGmsPlayServicesIdentity840Library 
:app:prepareComGoogleAndroidGmsPlayServicesLocation840Library 
:app:prepareComGoogleAndroidGmsPlayServicesMaps840Library 
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library 
:app:prepareComGoogleAndroidGmsPlayServicesNearby840Library 
:app:prepareComGoogleAndroidGmsPlayServicesPanorama840Library 
:app:prepareComGoogleAndroidGmsPlayServicesPlus840Library 
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet840Library 
:app:prepareComGoogleAndroidGmsPlayServicesVision840Library 
:app:prepareComGoogleAndroidGmsPlayServicesWallet840Library 
:app:prepareComGoogleAndroidGmsPlayServicesWearable840Library 
: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 
: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 
Note: Some input files use or override a deprecated API. 
Note: Recompile with -Xlint:deprecation for details. 

:app:compileDebugNdk UP-TO-DATE 
:app:compileDebugSources 
:app:compileDebugUnitTestJavaWithJavac 
:app:processDebugJavaRes UP-TO-DATE 
:app:processDebugUnitTestJavaRes UP-TO-DATE 
:app:compileDebugUnitTestSources 
:app:compileDebugAndroidTestJavaWithJavac 
:app:compileDebugAndroidTestNdk UP-TO-DATE 
:app:compileDebugAndroidTestSources 

BUILD SUCCESSFUL 

Total time: 1 mins 31.987 secs 
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:prepareComAndroidSupportAnimatedVectorDrawable2321Library 
:app:prepareComAndroidSupportAppcompatV72321Library 
:app:prepareComAndroidSupportCardviewV72321Library 
:app:prepareComAndroidSupportDesign2321Library 
:app:prepareComAndroidSupportMediarouterV72300Library 
:app:prepareComAndroidSupportRecyclerviewV72321Library 
:app:prepareComAndroidSupportSupportV42321Library 
:app:prepareComAndroidSupportSupportVectorDrawable2321Library 
:app:prepareComGoogleAndroidGmsPlayServices840Library 
:app:prepareComGoogleAndroidGmsPlayServicesAds840Library 
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics840Library 
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing840Library 
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite840Library 
:app:prepareComGoogleAndroidGmsPlayServicesAppstate840Library 
:app:prepareComGoogleAndroidGmsPlayServicesAuth840Library 
:app:prepareComGoogleAndroidGmsPlayServicesBase840Library 
:app:prepareComGoogleAndroidGmsPlayServicesBasement840Library 
:app:prepareComGoogleAndroidGmsPlayServicesCast840Library 
:app:prepareComGoogleAndroidGmsPlayServicesDrive840Library 
:app:prepareComGoogleAndroidGmsPlayServicesFitness840Library 
:app:prepareComGoogleAndroidGmsPlayServicesGames840Library 
:app:prepareComGoogleAndroidGmsPlayServicesGcm840Library 
:app:prepareComGoogleAndroidGmsPlayServicesIdentity840Library 
:app:prepareComGoogleAndroidGmsPlayServicesLocation840Library 
:app:prepareComGoogleAndroidGmsPlayServicesMaps840Library 
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library 
:app:prepareComGoogleAndroidGmsPlayServicesNearby840Library 
:app:prepareComGoogleAndroidGmsPlayServicesPanorama840Library 
:app:prepareComGoogleAndroidGmsPlayServicesPlus840Library 
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet840Library 
:app:prepareComGoogleAndroidGmsPlayServicesVision840Library 
:app:prepareComGoogleAndroidGmsPlayServicesWallet840Library 
:app:prepareComGoogleAndroidGmsPlayServicesWearable840Library 
: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 
Note: Some input files use or override a deprecated API. 
Note: Recompile with -Xlint:deprecation for details. 

: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 
:app:transformResourcesAndNative_libsWithJavaResourcesVerifierForDebug UP-TO-DATE 
:app:transformClassesWithInstantRunForDebug FAILED 

FAILURE: Build failed with an exception. 

* What went wrong: 
Execution failed for task ':app:transformClassesWithInstantRunForDebug'. 
> 24 

* Try: 
+0

どのAndroid APIとJava JDKのバージョンを使用していますか?あなたはより多くの情報を入れる必要があります。 –

+0

ログの最後に試してみることをしましたか(ここでは断ち切られています)? --debugと--stacktraceを実行すると、より多くの情報を得ることができますが、出力にもっと注意を払う必要があります。 –

答えて

1

はそれを参照してくださいyoullの設定の検索インスタント..設定で実行する瞬間をオフにしようとすると:ここでは

は、私は自分の携帯電話上でアプリケーションを実行しようとして、私が取得出力されます。またはあなたのgradleのパスを新しいものに変更していないかもしれませんか?

1

Android Studio 2.0でプロジェクトをビルドすると、以下のようなメッセージボックスが表示されますか?

Studio 2.0 update prompt

ない場合、あなたはそれを更新したスタジオ2.0でプロジェクトをビルドするとき、おそらく表示されます。このウィンドウに気を付けます。 Gradle-Pluginバージョンを'com.android.tools.build:gradle:2.0.0'に変更します。Gradle-wrapperdistributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zipあなた自身で行うこともできます。

詳細はthisをご覧ください。

13

Androidスタジオ2.0でインスタント実行オプションを無効にしてください。

これは私を助けてくれます。

+0

私はこの問題を理解するのに多くの時間を無駄にしました。ありがとうございます+1 –

+0

これは私のためにまったく機能しません。 –

関連する問題