I have been facing this issue for 2 days that Android SDK cannot be found after I sync the gradle files, I have to close project and remove from the recent projects and re-open it, I don't remember what I updated or what I changed recently.
And yes, I have already tried invalidate caches and restart, clearing gradle cache etc.
System Specs:
Android Studio 3.1.3
Build #AI-173.4819257, built on June 4, 2018
JRE: 1.8.0_152-release-1024-b01 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.13.5
Thanks in advance.
First rebuild the app. might this has a good result
And remember don't use many countries IP like Iran because Android Studio Boycott this country. And thus connect to Vpn and Then Clean And Build project.
this ways might help you
Related
I am facing an annoying bug in the newest Android Studio IDE (v4.0)
After the IDE restart(simple restart or after the PC restart, I can find any 100% case to reproduce this bug) sometimes AS starts and opens the project with such bugs:
Project structure becomes collapsed or hidden
Project files are NOT clickable in any case, so I can't close or open any files
Studio shortcuts do not work at all
The top toolbar is missing. (But still, it is shown as enabled in the "View" dropdown menu)
Some AS windows do not open. (For example, I am not able to open "Check For Updates" window)
I tried invalidating caches/restart option, but it makes no sense. The only solution is to delete AS studio(Without or with deleting of the settings), then install the older version of AS and make an update to the latest version of the AS.
If I try to simply delete AS and then install the latest 4.0 version, it will have the same bugs as were before the reinstall. If I want to install 4.0 studio without and older version-update routine, than I need to delete all the AS user settings.
What a hell is going on? Someone else facing this issue? Is there is a workaround for this annoying bug?
AS details:
Android Studio 4.0
Build #AI-193.6911.18.40.6514223, built on May 20, 2020
Runtime version: 1.8.0_242-release-1644-b01 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1237M
Cores: 16
Registry: ide.new.welcome.screen.force=true
Non-Bundled Plugins: org.jetbrains.kotlin
delete C:\Users{username}.AndroidStudio4.0 folder then try to open the android studio you will re install all the configuration and file support for android studio
I've started learning android development and I created multiple new projects with basic activity but none of them with a preview. I tried to build->clean and file->invalidate caches / restart but that didn't work
Android Studio 3.1.4
Build #AI-173.4907809, built on July 23, 2018
JRE: 1.8.0_152-release-1024-b02 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
Did you add all your dependencies??/
Like com.android.support:appcompact-v7:{version}
Be sure to check all other dependencies too
Click on the red exclamation mark on the top right corner of the preview window to see what the error is. Please post the error here for more specific help.
you have 2 tabs (design - text) open text tab and on right side you have preview you should find red warning icon there open it a
Can you check in SDK Tools, if you have android sdk tools 26 or later installed? or if the status is updated something? also check if the constraintlayout module are installed in Support Repository section in SDK Tools tab.
changing library version from 28.0.0-rc01 to 28.0.0-alpha1 solved the problem. Thank you all for your effort.
I have committed a codestyle for a project in .idea/codeStyles/Project.xml. It works as expected on my machine.
When I clone this project with this codestyle changes on another machine, Android Studio IDE overrides the file (Project.xml).
I want to share this same codestyle across the team using a project-level codestyle configuration using source control and not by manually setting the codestyle for the project by importing it through the settings.
I couldn't really figure out a way to get this done.
Product version:
Android Studio 3.0.1 Build #AI-171.4443003, built on November 9, 2017 JRE: 1.8.0_152-release-915-b08 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Mac OS X 10.13.1
After having this issue on Mac OSX, I reinstalled everything for Android Studio. (Studio itself, SDK's), ... Gradle Sync just does not work anymore. Anybody experiences this also? JAVA SDK Installed is 1.8.0_161.
"Uninitialized object exists on backward branch 70" on gradl sync (see screenshot)
error
android studio version
Bintray was experiencing an outage this morning. This is where a lot of Gradle's Android dependencies are hosted, so it was most likely affecting your Gradle Sync Process. Keep an eye on the status page here, and try again if it turns green. http://status.bintray.com/
This is a bug of JDK old versions. Go to the project structure and change your project to latest JDK version like 1.80_72 or later
After upgrading my Android Studio (on Ubuntu 14.04) to version 3.1.4 I also experienced a build problem:
Gradle sync failed: Uninitialized object exists on backward branch 70
Exception details: error in bytecode
Found out it was due to an old JDK version I have installed locally.
Instead of updating my local JDK I changed the project settings to use the embedded JDK, which, by the way, Android Studio says is the recommended option, and that solved the problem.
I've a problem building my app in Android Studio. It is just a small app (about 35 classes) with now modules and with only a few library dependencies. But Android Studio or Gradle often seems to build old sources.
For example now I added a simple line Log.i(TAG, "var: " + var). But I don't get this output. I tried to clean the project and then run it again but still there is no log-output. After cleaning and running once again I get this message:
10/07 09:27:11: Launching app
The APK file <path-to-file>/<file>.apk does not exist on disk.
Error while Installing APK
I know I maybe can solve this buy uninstalling the app first and building it again and/or even by clicking "refresh all gradle projects" but I don't want to do that all the time. I only have this problem for about 2 months now. But it appears very irregural.
I am using the following versions now:
macOS Sierra Version 10.12
Android studio 2.2 Buikd #AI-145.3276617, built on September 15, 2016 (JRE: 1.8.0_76-release-b03 x86_64)
java version "1.8.0_102", Java(TM) SE Runtime Environment (build 1.8.0_102-b14), Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode
Gradle 2.2.0
But this problem also appeared in another app on another system, too. There I used El Capitan and a beta version of Android Studio 2.1.
So what can I do?
Btw. I never used InstantRun. So this is definitely disabled.