When I import an Eclipse project into Android Studio, I got this problem:
Gradle 'XNote' project refresh failed
Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject.
Anyone knows why it happened? Thanks!
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
Palanivelraghul was right. A Studio has to download the old version. Then it presented 3 different options after it was complete.
Choose the top option ~"Sync with 3.0.1".
Event Log:
I got it working after upgrading build tools to version 25.0.0 in build.gradle:
And change project to use newest gradle version 3.3 with default gradle wrapper (File -> Settings -> Gradle)
Just Update two things:-
1) Update your
Build.gradle
to2) Update Gradle-wrapper.properties: (
Change Android mode > Project mode then Extend Gradle and open Gradle-wrapper.properties
)Replace
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
ByThis always resolves the issue. may it usefull for you
In my case I removed folder .idea from the project and then restarting the studio automatically manages to all the required folder and gradle work.
I have solved this problem.
Google doesn't update ADT any more, so when Eclipse export a project to gradle, it use an old gradle plugin version that Android Studio doesn't support.
First, you should check the version of gradle plugin that you have installed. Open Android Studio's installation directory,then open the directory
\gradle\m2repository\com\android\tools\build\gradle\
, you will see all version you have installed.Then open Android Studio, open tab 'Project -> Gradle Scripts', Edit file
build.gradle
, change the gradle plugin to newest version you have installed, such as 2.3.0:[OPTIONAL] This step is not necessary, but if you do not do this, you may see this problem:
Check the newest version of gradle you have installed at
C:\Users\YOUR USER NAME\.gradle\wrapper\dists
. Then open tab 'Project -> Gradle Scripts', edit filegradle-wrapper.properties
, modify the gradle version(attention: gradle, NOT gradle plugin) to the newest at the last line.Finally, click
Build - Clean Project
, done! If it still warning "Gradle project sync failed...", just clickTry Again
!AT THE END, SOMEBODY HELP ME TO TRANSLATE MY ANSWER TO REAL ENGLISH THAT NO grammatical mistakes!!!
First, delete your .gradle folder in the home directory then restart Android Studio.