步驟
- 在android studio 中,file -- new -- import module -- 選擇目標項目的位置 -- next -- next --finish 即可
遇到的問題
- 問題一:
Error:Execution failed for task ':digitalNote:processDebugManifest'.
> Manifest merger failed with multiple errors, see logs
解決辦法: 由于該module依賴了另外的module,所以倒導入其中一個的時候,會自動導入依賴module。 然后不同的依賴間,最小的sdk版本不同,會出現上述該問題。 統一修改,即可。
http://stackoverflow.com/questions/35842955/manifest-merger-failed-with-multiple-errors-in-android-studio
- 問題二:
Error:Execution failed for task ':digitalNote:processDebugManifest'.
> Manifest merger failed : Attribute application@theme value=(@style/CustomActivityTheme) from AndroidManifest.xml:18:9-51
is also present at [penddo_test:digitalNoteAPI:unspecified] AndroidManifest.xml:19:9-40 value=(@style/AppTheme).
Suggestion: add 'tools:replace="android:theme"' to <application> element at AndroidManifest.xml:14:5-38:19 to override.
解決辦法:根據報錯提示可知,修改sdk版本后,導致主題不匹配。修改application中主題即可。