I recently reformatted my computer and when I reinstalled Android Studio and its packages and tried to run my previous projects it said it can't render properly.
What should I do to resolve this?
Also, the file structure doesn't show on the left hand side of Android Studio.
I managed to fix it by importing the old projects to android studio.
Related
So I am very much a newcomer to the android studio, so I might've missed a few settings here and there, but
when I try to run a code with created java module, it doesn't recognize any of my code.
I attached the screenshot of what the ide returned to me.
I tried to reinstall the newest version of the android studio with the newest version of SDK (I attached another image file.) several times, but it doesn't seem to go anywhere.
For the SDK tools, I have the followings:
Android SDK Build-Tools
Android Emulator
Android SDK Platform-Tools
Also, I did try Build>Cealn Project.
Does anyone know how to fix this problem?
P.S. Here is my build gradle for the java module.
I had minor problems in a project I was working on and use invalidate caches and clean to see if that would help. However that did something not just to that one project but to android studio in general. it does not recognize java, the appearance of even the home screen has changed. I can't start any new projects in java and none of the old work. Strangely, even after I uninstalled both studio and java and then reinstalled the same problem persists.
incompatibility between the Android Studio cache and your current project layout. If you suspect this is the problem, then select File> Cache / Restart> Validate and Restart from the Android Studio toolbar.
To set JDK location: you can see this video: https://www.youtube.com/watch?v=jA97GYqRODE
Try to clear Android Studio cache, assuming you're using v3.3, delete the cache folder located at:
C:\Users\your_username\.AndroidStudio3.3\system\caches
I'm not exactly sure what caused this or when it occurred but all of imports in MainActivtiy.java were being used successfully without any errors. The app compiled and has been working great. I went back and added some images in my #drawable folder and them added them in my .xml file. Some time after that, every OpenCV class and keyword imported is now an error with "Cannot Resolve Symbol [symbol]." I have tried every suggestion I found with no luck. My app still works, but I can not edit or anything OpenCV keywords.
I was using Android 3.2.0 with OpenCV 3.20, I updated Android Studio to 3.2.1.
Things I have tried, all with no success:
*Everything from this question including
-Delete .idea folder and .iml folder and re-imported project
-Invalidate cache/restart
-Set source and target compatibility to 1.8 for the app and opencv module
-Clean/Rebuild
*Everything from this question that was not repeated
*Update Android Studio
*Remove and re-install opencv
*Close and re-open Android Studio
*Restart computer
What is strange is that everything was fine and then this suddenly happened without much warning. Also, when I click on the OpenCV resources and click on the .java files, they all say "File was loaded in the wrong encoding: UTF-8" and I can't see anything. I followed the steps here when loading OpenCV and whenever I have looked up declarations or anything else in these java files there was no issue. How can I resolve this?
I tried a few more things including:
-Making a new project and coping the code from the old one over, same issues
-Re-installing Android Studio and importing old project, same result.
The only thing that solved my problem was uninstalling Android Studio, then re-installing it and making a new project. I copied the code over and imported the OpenCV module and all the errors went away. I went from version 3.2.0 to 3.2.1 as well
I was programming in Android Studio, on MAC OS X macOS Sierra.
I was debugging code on one emulator, then I started next emulator with different phone. Then accidentally laptop restarted (with the grey screen https://i.kinja-img.com/gawker-media/image/upload/s--HPvl05ih--/c_scale,f_auto,fl_progressive,q_80,w_800/18mfougmh04injpg.jpg).
After boot everything come back, Android Studio too. But I can't debug my apps. I have
Error:java.lang.NullPointerException (no error message)
This happening everytime I try to run my app.
It is on my company project, from git. I tried different versions of code.
I tried also (with chronology):
reinstall Android Studio
reinstall SDK, Virtual Devices
reinstall Android Studio after completly delete it from Mac, using terminal (How to completely uninstall Android Studio?)
reinstall Java (uninstall with the tip from Java webpage (https://www.java.com/en/download/help/mac_uninstall_java.xml)
I don't know what I can do next besides reinstalling OS.
Thanks
Okay.
After that post I also tried cleaning cache, logs and again reinstall Java JDK. Nothing helped.
Unfortunately the only solution which helped - format and reinstall system.
Try File -> Invalidate caches / Restart... in android studio.
you must remove ".gradle" folder into your root project and restart your android
studio.
I want to take on a sound recorder project from github: https://github.com/avipars/Android-SoundRecorder
But, it came from IDEA or Eclipse. I tried importing it through github, which didn't work. Then, I downloaded the ZIP and put it in android studio without much luck.
Android Studio won't recognize the file system and I want to get gradle working too.
So, how can I get it in Android Studio with Gradle working?
To clarify, I can get the project in Android Studio. It just won't compile.
Download the project in .zip form, then extract to your preferred workspace.
It looks like the project relies on two external libraries:
android.library.reference.1=../../android-libs/ListViewAnimations/library
android.library.reference.2=../../android-libs/UndoBar/library
Obviously, Android Studio won't know about these libraries while importing this project alone. Remove the above lines from project.properties and add them later into your Android Studio project as dependencies or modules (if you can find them). Otherwise, you can work out the dependencies in the code after importing.
Once you have removed those lines, from Android Studio, you can select "Import project"
Follow the import wizard and you should be brought into Android Studio with a summary of the import result. From there you can muck with .git stuff and add back in any third party libraries that this source code may rely on.
Hope that helps!