android studio撤销按钮,Android Studio无法撤消(Android Studio Can't Undo)
Android Studio無法撤消(Android Studio Can't Undo)
有時候當我嘗試撤銷Android Studio中的更改時,我得到以下結果:
無法撤消
受此操作影響的文件已被更改。
這很好,但我不關心受影響的文件。 我只關心當前文件。 我將在稍后處理這些文件。 有沒有辦法強制Android Studio撤消當前文件中的文本更改,而不用擔心其他文件中的內容? 這是開發者認為他們比用戶更了解的情況之一。 讓我害怕使用撤銷按鈕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
更新時間:2019-10-30 12:10
最滿意答案
原因是
你首先做了一些行動(A),它影響了一些文件,包括一些叫做F的文件。
然后你做了一些改變,這些改變影響了另一組文件,包括前一組但不是F的一些文件。
現在你去文件F&嘗試撤消。 F的動作堆棧頂部的動作(最后一個)是A.但是當你請求它恢復時,它必須恢復所有其他文件,因為你正在恢復動作而不僅僅是文本。 但是由于某些其他文件已經因后續操作而發生了變化,因此您的請求無法繞過它們。 所以你正在收到消息。
無法撤消
受此操作影響的文件已被更改。
所以你只需要將你的修改本地恢復到F(或某個文件夾)。 為此,你有一個稱為本地歷史的工具。
您可以轉到您的文件,然后轉到VCS - > 本地歷史記錄 - > 顯示歷史記錄 。 或右鍵單擊您的文件或文件夾 - > 本地歷史記錄 - > 顯示歷史記錄 。
您可以看到您的多個修訂歷史記錄并恢復您想要的任何人。 :))
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
相關問答
我修好了它, 由于錯誤的“sdk路徑位置”,這是我的模擬器的adb問題, 我不得不從注冊表編輯器中更改它, 解決方案如下: 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-
...
您的問題中發布的第二張圖片顯示了工具欄和導航欄,為了使這些可見,請使用以下菜單項: 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嗎? 答案是肯定的,我已經做了很長時間了,它運行正常。 在Visual Studio中,Xamarin Android SDK的默認位置是: C:\Program Files (x86)\Android\android-sdk
C:\ProgramData\Microsoft\AndroidNDK64
在Android Studio中,SDK默認位置為: C:\Users\username\App
...
在主要活動中,像這樣: public class MainActivity extends AppCompatActivity implements CameraBridgeViewBase.CvCameraViewListener2{
static {
if(!OpenCVLoader.initDebug())
Log.d(sLog, "OpenCv load fail!");
else
Log.d(sLo
...
我剛發現行mainCanvas.drawPath(currentPath, currentpathPaint); 在兩種case MotionEvent.ACTION_UP:和case MotionEvent.ACTION_MOVE:不應該在那里。 它似乎重繪了位圖的路徑并在畫布上。 不確定我說的是正確的android術語。 I just found out that the line mainCanvas.drawPath(currentPath, currentpathPaint); at b
...
事實證明,精彩的CTRL + Z做到了這一點。 這是你最新的事情,所以如果你在此之后做了什么,我不保證這會有效。 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配合使用。 修復:使用工作版本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/
...
在文件資源管理器中轉到項目位置,并確保從應用程序的模塊中刪除build文件夾。 例如: my_project/app/build/ 然后,返回到您的項目并找到values.xml ,立即刪除這些行并重建它。 當您單擊錯誤并對其進行編輯時,您可能正在編輯生成的生成文件 Go to you project location in File Explorer and make sure to delete the build folder from your app's module. For exam
...
相應于此線程,您可以嘗試更改Registry | undo.documentUndoLimit Registry | undo.documentUndoLimit值,但這可能會導致未來的麻煩,至少在內存溢出( stackowerflow :))時。 編輯它: 按Ctrl + Shift + A鍵入注冊表 找到undo.documentUndoLimit項目并設置你想要的值(默認為100) Accordingly to this thread you can try to change Regist
...
原因是 你首先做了一些行動(A),它影響了一些文件,包括一些叫做F的文件。 然后你做了一些改變,這些改變影響了另一組文件,包括前一組但不是F的一些文件。 現在你去文件F&嘗試撤消。 F的動作堆棧頂部的動作(最后一個)是A.但是當你請求它恢復時,它必須恢復所有其他文件,因為你正在恢復動作而不僅僅是文本。 但是由于某些其他文件已經因后續操作而發生了變化,因此您的請求無法繞過它們。 所以你正在收到消息。 無法撤消 受此操作影響的文件已被更改。 所以你只需要將你的修改本地恢復到F(或某個文件夾)。 為此,
...
總結
以上是生活随笔為你收集整理的android studio撤销按钮,Android Studio无法撤消(Android Studio Can't Undo)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: android线程栈默认大小,线程的默认
- 下一篇: android开发模式,Android开