简体   繁体   English

如何还原我的Android Studio项目?

[英]How can I restore my Android Studio project?

I changed the name of the Android Studio project folder in the Windows Explorer before I started Android Studio. 在启动Android Studio之前,我在Windows资源管理器中更改了Android Studio项目文件夹的名称。 Bad idea. 馊主意。

Now I get the error: 现在我得到了错误:

Gradle sync failed: No toolchains found in the NDK toolchains folder for ABI with prefix: mipsel-linux-android Gradle同步失败:在ABI的NDK工具链文件夹中找不到前缀为mipsel-linux-android的工具链

And all my Activity files are replaced with one MainActivty that doesn't contains the things I've made. 我所有的Activity文件都替换为一个MainActivty,其中不包含我所做的事情。

Unfortunately I can't get a previous version with "show history" in Android Studio and i can,t get an older version via windows explorer "restore previous version" 不幸的是,我无法在Android Studio中获得带有“显示历史记录”的先前版本,也无法通过Windows资源管理器获得“还原先前版本”的旧版本。

I also tried to decompile it from the .apk on my phone. 我还尝试通过手机上的.apk对其进行反编译。 I got the layout and xml files but can't find my java classes. 我得到了布局和xml文件,但是找不到我的java类。

I worked since weeks on this project and don't want to lose it. 我已经在这个项目上工作了几个星期,不想失去它。 Can anyone help me either fix the error or restore the .apk? 谁能帮我解决错误或恢复.apk吗? Thanks so much for all suggestions and ideas 非常感谢您的所有建议和想法

First close the broken project this can be done with File > Close project 首先关闭损坏的项目,这可以通过“ File >“ Close project来完成

Then you have to reopen the project from the new location ie. 然后,您必须从新位置重新打开项目。 the renamed folder. 重命名的文件夹。

File > Open... browse in your filesystem for the project, select the folder and press OK File > Open...在文件系统中浏览该项目,选择文件夹,然后按OK

Wait for the gradle to sync and hopefully you won't have any problems! 等待gradle同步,希望您不会有任何问题!

I have the same problem when updating ndk-18. 更新ndk-18时遇到相同的问题。 You updated the NDK to version 18 and it is missing the folders/files. 您将NDK更新到版本18,但缺少文件夹/文件。 You can download ndk-v17 manually and extract the search folder "toolchains" to copy the missing folders/files to your folder android-sdk/ndk-bundle. 您可以手动下载ndk-v17并解压缩搜索文件夹“ toolchains”,将丢失的文件夹/文件复制到文件夹android-sdk / ndk-bundle中。 From github . 来自github

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM