怎樣才能導入別人的android項目不再報錯
- 直接run別人的項目
- 手動導入
1.去到要導入項目的目錄下把.idea,*.iml,local.properties
刪除(*表示所有)
2.進入app文件夾同理把build
, *.iml
刪除
3.打開已經(jīng)run成功的項目的build.graid
把classpath:
這整句復制,去要導入的項目中打開build.graid
進行替換。
4.打開gradle\wrapper\gradle-wrapper.properties
復制最后一句,去到要導入的項目進行替換。
5.改version
6.導入項目
確認下
7.出現(xiàn)Could not find com.android.tools.build:gradle:3.2.0.
點擊
8.若出現(xiàn)解決Configuration ‘compile' is obsolete and has been replaced with implementation
改成implementation
1.把compile 改成implementation
2.把androidTestCompile改成androidTestImplementation
3.把testCompile改成testImplementation
如果還有警告,看下運行按鈕,可以運行了
到此這篇關于怎樣才能導入別人的android項目不再報錯的文章就介紹到這了,更多相關Android項目報錯內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
- Android編譯出現(xiàn)Warning:Mapping?new?ns?to?old?ns報錯的解決方案
- Android報錯Error:Could not find com.android.tools.build:gradle:4.1解決辦法
- AndroidStudio報錯Emulator:PANIC:Cannot find AVD system path. Please define ANDROID_SDK_ROOT(解決方案)
- Android studio報錯:The emulator process for AVD (xxx) was killed
- android.enableD8.desugaring?=?false引發(fā)問題解決
相關文章
Android基于廣播事件機制實現(xiàn)簡單定時提醒功能代碼
這篇文章主要介紹了Android基于廣播事件機制實現(xiàn)簡單定時提醒功能代碼,較為詳細的分析了Android廣播事件機制及提醒功能的相關實現(xiàn)技巧,具有一定參考借鑒價值,需要的朋友可以參考下2015-10-10Android開發(fā)實現(xiàn)ScrollView中嵌套兩個ListView的方法
這篇文章主要介紹了Android開發(fā)實現(xiàn)ScrollView中嵌套兩個ListView的方法,結(jié)合實例形式分析了Android ScrollView中嵌套兩個ListView的操作技巧與相關注意事項,需要的朋友可以參考下2017-11-11