欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

怎樣才能導(dǎo)入別人的android項(xiàng)目不再報錯

 更新時間:2021年08月20日 17:13:12   作者:lance666  
每次看到好的項(xiàng)目都想拿過來看看源碼,可是導(dǎo)入以后各種報錯怎么辦?源碼有問題嗎?有這種可能,但更多的可能性是你沒有正確導(dǎo)入這個項(xiàng)目
  1. 直接run別人的項(xiàng)目
  2. 手動導(dǎo)入

1.去到要導(dǎo)入項(xiàng)目的目錄下把.idea,*.iml,local.properties刪除(*表示所有)

1

2.進(jìn)入app文件夾同理把build, *.iml刪除

在這里插入圖片描述

3.打開已經(jīng)run成功的項(xiàng)目的build.graidclasspath:這整句復(fù)制,去要導(dǎo)入的項(xiàng)目中打開build.graid進(jìn)行替換。

在這里插入圖片描述

4.打開gradle\wrapper\gradle-wrapper.properties復(fù)制最后一句,去到要導(dǎo)入的項(xiàng)目進(jìn)行替換。

5.改version

在這里插入圖片描述

6.導(dǎo)入項(xiàng)目

在這里插入圖片描述

確認(rèn)下

在這里插入圖片描述 在這里插入圖片描述

7.出現(xiàn)Could not find com.android.tools.build:gradle:3.2.0.

在這里插入圖片描述

點(diǎn)擊

在這里插入圖片描述

8.若出現(xiàn)解決Configuration ‘compile' is obsolete and has been replaced with implementation

改成implementation

1.把compile 改成implementation

2.把a(bǔ)ndroidTestCompile改成androidTestImplementation

3.把testCompile改成testImplementation

在這里插入圖片描述

如果還有警告,看下運(yùn)行按鈕,可以運(yùn)行了

在這里插入圖片描述

到此這篇關(guān)于怎樣才能導(dǎo)入別人的android項(xiàng)目不再報錯的文章就介紹到這了,更多相關(guān)Android項(xiàng)目報錯內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評論