android studio撤销按钮,Android Studio无法撤消(Android Studio Can't Undo)
Android Studio無法撤消(Android Studio Can't Undo)
有時(shí)候當(dāng)我嘗試撤銷Android Studio中的更改時(shí),我得到以下結(jié)果:
無法撤消
受此操作影響的文件已被更改。
這很好,但我不關(guān)心受影響的文件。 我只關(guān)心當(dāng)前文件。 我將在稍后處理這些文件。 有沒有辦法強(qiáng)制Android Studio撤消當(dāng)前文件中的文本更改,而不用擔(dān)心其他文件中的內(nèi)容? 這是開發(fā)者認(rèn)為他們比用戶更了解的情況之一。 讓我害怕使用撤銷按鈕tbh。
Some times when I try to undo changes in Android Studio I get this:
Can't Undo
Following files affected by this action have already been changed.
That's nice but I don't care about the files affected. I only care about the current file. I will deal with those files later. Is there a way to force Android Studio to undo my textual changes in the current file and worry less about what's in other files? This is one of those situations when devs think they know better than the user. Makes me scared of using that undo button tbh.
原文:https://stackoverflow.com/questions/41090536
更新時(shí)間:2019-10-30 12:10
最滿意答案
原因是
你首先做了一些行動(dòng)(A),它影響了一些文件,包括一些叫做F的文件。
然后你做了一些改變,這些改變影響了另一組文件,包括前一組但不是F的一些文件。
現(xiàn)在你去文件F&嘗試撤消。 F的動(dòng)作堆棧頂部的動(dòng)作(最后一個(gè))是A.但是當(dāng)你請(qǐng)求它恢復(fù)時(shí),它必須恢復(fù)所有其他文件,因?yàn)槟阏诨謴?fù)動(dòng)作而不僅僅是文本。 但是由于某些其他文件已經(jīng)因后續(xù)操作而發(fā)生了變化,因此您的請(qǐng)求無法繞過它們。 所以你正在收到消息。
無法撤消
受此操作影響的文件已被更改。
所以你只需要將你的修改本地恢復(fù)到F(或某個(gè)文件夾)。 為此,你有一個(gè)稱為本地歷史的工具。
您可以轉(zhuǎn)到您的文件,然后轉(zhuǎn)到VCS - > 本地歷史記錄 - > 顯示歷史記錄 。 或右鍵單擊您的文件或文件夾 - > 本地歷史記錄 - > 顯示歷史記錄 。
您可以看到您的多個(gè)修訂歷史記錄并恢復(fù)您想要的任何人。 :))
The reason for this is
You have first done some action(A) which has affected some set of files including some file called F.
Then you have done some changes which has affected another set of files which including some files on previous set but not F.
Now you go to file F & try to undo. The action(last) on the top of the action stack for F is A. But when you request it to revert back, it has to revert back with all the other files because you are reverting the action not just text. But since some set of other files has over changed with your later actions, your request cannot bypass them. So you are getting message.
Can't Undo
Following files affected by this action have already been changed.
So you want only to revert your changes locally to F(or some folder). For that purpose you have a tool called Local History.
You can go to your file and then VCS -> Local History -> Show History. Or Right click your file or folder -> Local History -> Show History.
You can see your multiple revision histories and restore anyone you want. :))
2016-12-12
相關(guān)問答
我修好了它, 由于錯(cuò)誤的“sdk路徑位置”,這是我的模擬器的adb問題, 我不得不從注冊(cè)表編輯器中更改它, 解決方案如下: https://msdn.microsoft.com/en-us/library/mt228282.aspx#ADB 1-Open Registry Editor by selecting Run from the Start buttons context menu, typing regedit in the dialog box, and choosing OK. 2-
...
您的問題中發(fā)布的第二張圖片顯示了工具欄和導(dǎo)航欄,為了使這些可見,請(qǐng)使用以下菜單項(xiàng): View > Toolbar View > Navigation Bar The second image posted in your question shows the toolbar and the navigation bar, in order to make these visible use the following menu items: View > Toolbar View > Naviga
...
Android Studio和Visual Studio可以安全地共享相同的Android SDK嗎? 答案是肯定的,我已經(jīng)做了很長時(shí)間了,它運(yùn)行正常。 在Visual Studio中,Xamarin Android SDK的默認(rèn)位置是: C:\Program Files (x86)\Android\android-sdk
C:\ProgramData\Microsoft\AndroidNDK64
在Android Studio中,SDK默認(rèn)位置為: C:\Users\username\App
...
在主要活動(dòng)中,像這樣: public class MainActivity extends AppCompatActivity implements CameraBridgeViewBase.CvCameraViewListener2{
static {
if(!OpenCVLoader.initDebug())
Log.d(sLog, "OpenCv load fail!");
else
Log.d(sLo
...
我剛發(fā)現(xiàn)行mainCanvas.drawPath(currentPath, currentpathPaint); 在兩種case MotionEvent.ACTION_UP:和case MotionEvent.ACTION_MOVE:不應(yīng)該在那里。 它似乎重繪了位圖的路徑并在畫布上。 不確定我說的是正確的android術(shù)語。 I just found out that the line mainCanvas.drawPath(currentPath, currentpathPaint); at b
...
事實(shí)證明,精彩的CTRL + Z做到了這一點(diǎn)。 這是你最新的事情,所以如果你在此之后做了什么,我不保證這會(huì)有效。 It turns out the wonderful CTRL+Z did the trick. This UNDOs your latest thing you did, so if you did anything after this I won't guarantee this will work.
最新版本的Android Studio無法與Glass配合使用。 修復(fù):使用工作版本1.2.1.1( http://tools.android.com/download/studio/canary/1-2-1-1 )。 為我工作。 The latest release of Android Studio does not work with Glass. Fix: Use the working version 1.2.1.1 (http://tools.android.com/download/
...
在文件資源管理器中轉(zhuǎn)到項(xiàng)目位置,并確保從應(yīng)用程序的模塊中刪除build文件夾。 例如: my_project/app/build/ 然后,返回到您的項(xiàng)目并找到values.xml ,立即刪除這些行并重建它。 當(dāng)您單擊錯(cuò)誤并對(duì)其進(jìn)行編輯時(shí),您可能正在編輯生成的生成文件 Go to you project location in File Explorer and make sure to delete the build folder from your app's module. For exam
...
相應(yīng)于此線程,您可以嘗試更改Registry | undo.documentUndoLimit Registry | undo.documentUndoLimit值,但這可能會(huì)導(dǎo)致未來的麻煩,至少在內(nèi)存溢出( stackowerflow :))時(shí)。 編輯它: 按Ctrl + Shift + A鍵入注冊(cè)表 找到undo.documentUndoLimit項(xiàng)目并設(shè)置你想要的值(默認(rèn)為100) Accordingly to this thread you can try to change Regist
...
原因是 你首先做了一些行動(dòng)(A),它影響了一些文件,包括一些叫做F的文件。 然后你做了一些改變,這些改變影響了另一組文件,包括前一組但不是F的一些文件。 現(xiàn)在你去文件F&嘗試撤消。 F的動(dòng)作堆棧頂部的動(dòng)作(最后一個(gè))是A.但是當(dāng)你請(qǐng)求它恢復(fù)時(shí),它必須恢復(fù)所有其他文件,因?yàn)槟阏诨謴?fù)動(dòng)作而不僅僅是文本。 但是由于某些其他文件已經(jīng)因后續(xù)操作而發(fā)生了變化,因此您的請(qǐng)求無法繞過它們。 所以你正在收到消息。 無法撤消 受此操作影響的文件已被更改。 所以你只需要將你的修改本地恢復(fù)到F(或某個(gè)文件夾)。 為此,
...
總結(jié)
以上是生活随笔為你收集整理的android studio撤销按钮,Android Studio无法撤消(Android Studio Can't Undo)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: android线程栈默认大小,线程的默认
- 下一篇: android开发模式,Android开