Wednesday 15 January 2020

Can Not Perform Copy-Paste in Android Studio

I have faced two main problems in Android Studio. First of all I can not perform copy-paste and cut-paste (ctrl+c - ctrl+v - ctrl+x) abilities in some classes. To fix that problem, I click "invalide caches/restarts", but it breaks down again immediately.

Second problem is (I think it is related to the first problem) compiler does not recognize already defined methods and attributes. Auto suggestion etc. does not work.

The steps I've taken to try to fix the problem are;

  1. File -> invalide caches/restarts,
  2. File -> Power Save Mode -> Disable,
  3. Close all opened tabs and fresh restart,
  4. File -> Sync Project with Gradle Files,
  5. File -> Sync with File System,
  6. Delete JDK and reinstall,
  7. Delete Android Studio and reinstall,
  8. Delete already downloaded SDK files and ".Android" folder,
  9. Disable and delete all plugins.
  10. Checked copy-paste keymap in File -> Settings -> Keymap
  11. Pulled the project from bitbucket to different 2 computers
  12. Created new project, copy whole project classes with NotePad++ to new Project
  13. Try to convert all Java codes to Kotlin, cannot convert

Here is my system specifications; Windows 10 Home Single Language (TR), version 1909. 16 GB ram. Android Studio 3.5.3 and Gradle Version 3.5.3

I have read all post about the same problem but there is no luck (The posts are only about MAC and Linux platform).

UPDATE 1.0 -> I have discovered that some classes cannot do the operations described above, but some classes can.

I realized that, There are no icons for classes that cannot do the operations I have described above. (Sometimes magically appears "J" icons and when I clicked another class, this J icon disappears immediately.) I think gradle or file system of Android Studio does not recognize these files as classes.

UPDATE 2.0 -> I have noticed that when I clicked the Structure section of DuoFragment (Which has 500+ lines codes and one of the uncompiled class) cannot load anything. Is DuoFragment size is bigger to process?

Also when I checked the Build section, some processes cannot run (I do not know if this is normal or not);

  • Task :app:compileDebugAidl NO-SOURCE,
  • Task :app:compileDebugRenderscript NO-SOURCE,
  • Task :app:processDebugJavaRes NO-SOURCE

No Suggestion Keymap Android Version Gradle sync is successfully if I do not add additional code

UPDATE 1.0 Images

The classes there are no icons or only have "J" icon cannot do operations

When I clicked/opened another class, "J" icon disappeared

UPDATE 2.0 Images

Some process cannot be done in Build section Cannot load DuoFragment structure DuoFragment code summary



from Can Not Perform Copy-Paste in Android Studio

No comments:

Post a Comment