2017-02-12 13 views
2

ラップトップをプレインストールする必要があり、Windows 10に切り替える必要があります。その前に私が作っやAndroid Studioの2.2.3に私のプロジェクトを保存し、私はプレインストール後のAndroidメーカーの同じバージョンをダウンロードし、私は既存のプロジェクトを開くを選択したとき、私は次のようなメッセージだ:Android Studio 2.2.3:Gradleプロジェクトの同期に失敗しました。

Failed to sync gradle project 'ApplicationName' Error:Unable to find method 'org.gradle.api.artifacts.Configuration.setExtendsFrom(Ljava/lang/Iterable;)Lorg/gradle/api/artifacts/Configuration;'.

Possible causes for this unexpected error include: Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.

Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project. Blockquote

私はすべてやったが私のプロジェクトを修正するためにAndroid Studioによって提案された3つのステップですが、どれもうまくいきませんでした。

+0

あなたのGradleのバージョンは何ですか? –

+0

gradle version:1.8 – Victoria

答えて

5

あなたのGradleのバージョンがある:あなたはおそらくそれを更新する必要がありますので、もはや機能していない1.8

の1-ゴーへ - >https://gradle.org/install チェックアウト、最新のverion番号を。プロジェクトディレクトリで

2 -\gradle\wrapper\ディレクトリおよび編集に移動: gradle-wrapper.propertiesファイル。

変更:

https://services.gradle.org/distributions/gradle-1.8-all.zip 

へ:

https://services.gradle.org/distributions/gradle-3.3-all.zip

、3-同期doesnの場合のGradleとアンドロイド→シンクProjectは

、4-をファイル→[ツール]ジョブを再起動するAndroidスタジオ

+0

上記の手順を試しましたが、もう一度失敗してエラーが表示されます: 'Error:ルートプロジェクト 'MyApplication2'の設定中に問題が発生しました。 >設定 ':classpath'のすべての依存関係を解決できませんでした。 >メソッドcom.google.common.collect.Iterators.emptyIterator()にアクセスしようとしました。Lcom/google/common/collect/UnmodifiableIterator;クラスorg.gradle.api.internal.DefaultDomainObjectCollection'からそれを教えてください。おかげで、 –

+0

ありがとう、それは働いた。 – Tia

1

あなたのgradleを更新してください。

ファイルを開く>プロジェクト構造>プロジェクトタブ

enter image description here

Androidのメーカーは、現在のプロジェクトで使用されるのGradleとプラグインをチェックし、更新するために、プロジェクト構造のメニューが組み込まれています。

以下のウェブサイトでは、Android Studioのgradleとgradleプラグインをアップデートする方法について詳しく説明しています。

Update gradle plugin Android Studio

0

だけでファイルにアクセスしてください - >無効化キャッシュ/再起動 - >無効化と再起動

関連する問題