1. 程式人生 > >androidstudio載入專案問題

androidstudio載入專案問題

問題:To take advantage of all the latest features (such as Instant Run), improvements and security fixes, we strongly recommend that you update the Android Gradle plugin to version 3.0.1 and Gradle to version 4.1.  You can learn more about this version of the plugin from the release notes.


————————————————————清理專案,rebuild一下(問題分割線)


************還有問題************

問題Error:(29, 0) Could not find method implementation() for arguments [project ':app'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

<a href="openFile:D:\android\YiMinLodge\build.gradle">Open File</a>



找到build檔案,把下面這行程式碼註釋掉

dependencies {
//    implementation project(':app')
}

—————————————————————清理專案,rebuild一下,然後執行(問題分割線)

Information:Gradle tasks [clean, :app:generateBaiduDebugSources, :app:generateBaiduDebugAndroidTestSources, :app:prepareBaiduDebugUnitTestDependencies, :app:mockableAndroidJar, :caldroidlibrary:generateDebugSources, :caldroidlibrary:generateDebugAndroidTestSources, :caldroidlibrary:mockableAndroidJar, :caldroidlibrary:prepareDebugUnitTestDependencies, :library:generateDebugSources, :library:generateDebugAndroidTestSources, :library:mockableAndroidJar, :library:prepareDebugUnitTestDependencies, :soulibrary:generateDebugSources, :soulibrary:generateDebugAndroidTestSources, :soulibrary:mockableAndroidJar, :soulibrary:prepareDebugUnitTestDependencies]


——————————————————————清理專案,rebuild一下,然後執行(問題分割線)

Error:Execution failed for task ':app:clean'.

> Unable to delete directory: D:\android\YiMinLodge\app\build\intermediates\incremental-verifier\baidu\debug\com\example\yimin\yiminlodge


關閉androidstudio。找到這個目錄D:\android\YiMinLodge\app\build\   刪除兩個svn沒有同步的資料夾。顯示紅色感嘆號。刪除。


————————————————————————————————————————————————

開啟專案,清理並build。執行成功。這個專案匯入的可夠曲折的。