# Android Studio 複製專案,修改路徑位址 ###### tags: `Android Studio` --- :::info 以下範例:複製 marriagesuggestion --> 為 marriagesuggestionCh8 ::: 複製檔案資料夾,之後重新命名為 marriagesuggestionCh8 ![](https://i.imgur.com/Vwc1Jl7.png) 這三個資料夾內的資料夾名稱都要修改為 marriagesuggestionCh8 `D:\Android\MarriageSuggestionCh8\app\src\androidTest\java\com\example\修改檔名` `D:\Android\MarriageSuggestionCh8\app\src\main\java\com\example\修改檔名` `D:\Android\MarriageSuggestionCh8\app\src\test\java\com\example\修改檔名` ![](https://i.imgur.com/qz4tNRM.png) ![](https://i.imgur.com/1ftRgTC.png) 之後打開複製的檔案,裡面也有內容要改 applicationId 的路徑要改為 "com.example.marriagesuggestionCh8" ![](https://i.imgur.com/Len15LW.png) ![](https://i.imgur.com/FSiruS6.png) 修改封包路徑,Java底下的檔案都要修改 `package com.example.marriagesuggestionCh8;` ![](https://i.imgur.com/WwxXzTN.png) 這個Java(generated)底下的資料夾、檔案內的路徑也要修改 ![](https://i.imgur.com/z8LP0IF.png) `D:\Android\MarriageSuggestionCh8\app\build\generated\source\buildConfig\debug\com\example\修改檔名` ![](https://i.imgur.com/pwuqDJS.png) 修改BuildConfig內的路徑 ![](https://i.imgur.com/S7o0tm9.png) 最後再按 build > clean project ~~Java(generated)好像會直接被清掉,所以好像這裡不用改路徑XD~~ ![](https://i.imgur.com/4O48f93.png) --- ### 如果專案小的話,也可以直接開新專案複製程式碼就可以哩^^ --- <span class="code1"></span> <style> h2 { color: #2383B8; } h3 { color: #1AA340; } h4 { color: white; background-color: #2383B8; padding:8px; } .code1 { padding: 2px 4px; font-size: 90%; color: #c7254e; background-color: #f9f2f4; border-radius: 4px; font-family:'Fira Code'; } .code { padding: 2px 4px; font-size: 90%; font-family:'Fira Code'; } </style>
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up