2017-07-06 50 views
0

我試圖複製我的Android Studio項目,但每次我這樣做都會給我帶來錯誤。我閱讀了關於這個主題的其他問題和答案,但沒有一個幫助我。如何在Android Studio中複製項目?

當我複製一個項目,並嘗試在它提供了以下錯誤模擬器中運行它:

"Installation failed with message Invalid File: C:...\app\build\intermediates\split-apk\debug\slices\slice_9.apk. It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing."

據對類似問題的答案,它應該幫助執行「清潔工程」。當我這樣做,模擬器啓動,但停止了運行時錯誤啓動程序:

"java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{nl.assortimens.hardlooptrainingapp/nl.assortimens.hardlooptrainingapp.MainMenuActivity}: java.lang.ClassNotFoundException: Didn't find class "nl.assortimens.hardlooptrainingapp.MainMenuActivity" on path: DexPathList[[zip file "/data/app/nl.assortimens.hardlooptrainingapp-1/base.apk"],nativeLibraryDirectories=[/data/app/nl.assortimens.hardlooptrainingapp-1/lib/x86, /vendor/lib, /system/lib]]"

我如何複製項目沒有錯誤或我應該怎麼做才能解決這些錯誤?

回答

0

試圖刪除文件夾intermediatesrebuild的項目,如果不刪除該文件夾buildrebuild再次

+0

謝謝。這解決了我的問題。我試圖刪除中間文件夾,但我需要刪除整個生成文件夾,使其工作 –

0

去運行 - >改造項目,並應工作正確

0

嘗試刪除的build.gradle文件和settings.gradle文件。然後重建。希望這會給你的問題。