android.bat not opening Android SDK manager - java

Yes, this question has been asked before. But the solutions on the internet are not working so that's why I am asking it here. I'm guessing the solutions aren't working because I am using newer versions but I'm not sure.
Bit of Background: So I am making a small game in Unity. I have to test it on Android so I can check if there are any problems or not. So I check around the internet on how I may be able to do that. Turns out, I need to change the build settings to android and I also need JDK installed on my computer along with Android SDK Manager so I download them both. I did not install the Android Studio but just the Command Line Tools because many tutorials say that I do not actually need the whole Android Studio because I'm gonna be making the app in Unity not in Android Studio. So I do that. I install JDK and Extract the command line tools.
I think the JDK installed fine because after installing JDK, I opened Internet Explorer (No, I don't use IE, I use Chrome but I opened it just for fun). And a little notification showed up at the bottom which basically said that I could now run Java on the browser so that's why I don't think there are any problems with the JDK installation.
Problem: I extracted Command Line tools of Android Studio and found that there was only a tools/ folder in it. I opened it and clicked on android.bat but the Android SDK manager doesn't work. A CMD screen just flashes for a moment but then nothing happens.
Solution I have Tried:
Change set java_exe to:
set java_exe="C:\Program Files\Java\jre7\bin\java.exe"
and delete the line:
call libjava_find.bat
But I can't find set java_exe code anywhere in the file. The file doesn't have it. How am I supposed to change it?

Alright, so I figured it out but I was still unable to pinpoint the problem. Here is what I did:
Installed a fresh copy of Windows 10. Note: It is highly unlikely that this will solve the problem. But where I live, it is very common to just install a fresh copy of windows whenever you get a problem. I really don't think you need to do this.
Follow all the instructions from: https://www.youtube.com/watch?v=yLFBu-VlBIw
If you get the following error:
Error building Player: CommandInvokationFailure: Unable to list target platforms. Then use this fix: not finding android sdk (Unity)
These steps solved the problem for me and I was able to run it properly.

Related

Android Studio stuck on loading screen

Every time I run Android Studio, this loading screen pops up, but Android Studio stays here and doesn't load. It's like this following picture except that the loading bar is loaded all the way but stuck there. I am running Windows 10.
I have tried many things, including setting the system variables JDK_HOME to where my JDK is located and the same for JAVA_HOME. I have also set a path. I ran as admin many times and let AS through a firewall.
I have also restarted and reinstalled countless times.
The version of AS is 2.0, and I am running the latest versions of Java.
Any help?
Open file Android Studio setup directory/bin/idea.properties
Add disable.android.first.run=true to end
Restart Android Studio
PLEASE NOTE: This will break patch updating to the next version. We
now check full binary checksums on the whole installation to prevent
various install corruption bugs as well as to preserve application
signatures. Therefore, make a copy of this file first, and before
updating, put it back.
Please try the following method to fix that issue:
Find the folder of your AndroidStudio: based on the following directory
macOS: ~/Library/Application Support/Google/AndroidStudio[version]
Delete the AndroidStudio folder.
Restart
Ref:https://developer.android.com/studio/known-issues#studio-config-directories
In order to know how to debug the problem, I executed the bin\studio.bat script in the terminal and inspected the actual Idea exceptions in order to fix the problem.
For me, this was the issue:
ERROR - llij.ide.plugins.PluginManager - java.net.BindException: Address already in use: bind
java.util.concurrent.CompletionException: java.net.BindException: Address already in use: bind
This means the plugin manager is trying to listen on a port that is not available. Is something listening on that port? For me, it was the stupid "excluded ports" by Windows, so I simply stopped the service:
net stop winnat (as administrator), and confirmed that Android Studio started to work.
No need to re-install, delete precious configuration (and plugins, etc.). Just read the log provided by the bin\studio.bat script, and I was able to fix the issue.

Android Studio won't start new project, help! (gets transparent)

when i install it and try open for the first time, it works perfectly, but when i tried after, and click in "Start a new Android Studio project", the window opens, but gets transparent for ever(see in the image). it gives no error alerts, files missing, nothing.
after that, i tried to:
update all tools and SDKs, not works.
run it as ADM, not works.
run this with nothing more running to have more power of the pc, not works.
add the "JAVA_HOME" system variable with the JDKs and JREs locations, not works.
install individual SDK tools, not works.
uninstall and reinstall all JREs, JDKs and Android Studio, not works.
Change JREs and JDKs versions to older ones, not works.
search for the Minimal System Requirements to run it (that you can see here: http://developer.android.com/sdk/index.html)
and my pc supports i guess (that have 4gb RAM, 150gb of free space on the install location, AMD Sempron 145 2.8ghz processor, Win 7 32-bit, 1280x1024px screen resolution and all JREs, JDKs and SDKs needed).
yesterday i tried to change the installation location to another HD, not works too
and in my last try, i undo my pc with a System Restore to 4 days before the first installation, nothing of this works
anyone knows what i can do to solve this? if not, exist another program that i can use instead of the Android Studio? i'm a newbie in android development, i relly relly need some help pls :(
sorry my bad english and the big post, i'm just trying to be more specific as possible.
Thanks in advance, have a good day.
go to your user directory.
Example : C:\Users\yourName.
delete the directory..
.AndroidStudioX.X
if you have few of them delete all of them.
this should reset Android Studio as a fresh install
helped me a lot of times.

Emulator not showing the updated output after making the changes in the code

Yesterday i updated eclipse and sdk, and now have made some changes to the code but not able to see the changes made in emulator when i run it.
These are the things i have tried by googling:
restarted eclipse and avd
clean the project
checked whether all the options are checked under project
properties->builders.
Checked whether all the options are checked under
windows->preferences->android->build
When I tried to test it on device, I was not able to export, but got "No Build Tools installed in the sdk".
So I installed the tools in the sdk, but I still could not get updated output.
Can anyone help me out?
Are you sure the latest apk is getting installed on the device? There are some instances where it will not overwrite an installed apk. For example if your build-signing key has changed recently. Try uninstalling the app fully from the device first, and try again.
Go to device manager edit device virtually created by you or system ..you will find one check box saying enable snaps shot. check mark it. it will work..

I can't locate the Android SDK on my computer

I installed the Android SDK on my computer a few months ago and now I've finally motivated myself to begin developing.
At the moment, I'm trying to install the plugin for Eclipse, and I need to set the location of the SDK on my computer but... I can't find it.
I know it's installed, since the SDK Manager says it is, but I don't know where!
There's no Android folder in Program Files or in C:\
Searching for Android in explorer didn't yield anything relevant.
So.. Does anybody know where I can find the SDK?
It doesn't seem to be in the default location.
Thanks
If what you say about the SDK Manager in the OP is correct, and if you have access to the SDK Manager, then it shows where the SDK is currently located.
Right below the Package and Tools menu, it shows the SDK path.
However, if you cannot access the SDK Manager, then odds are you downloaded either the ADT Bundle or the SDK Installer.
If it is the earlier, then the file that you downloaded is named: adt-bundle-windows-x86.zip. If it is the later, and if you remember installing it, then the default path for the installation is in your Program Files\Android..... The installer is named something like this: installer_r21.1-windows.exe (this is the current available version)
If none of the suggestions on this page, helps, then the last resort is to download the SDK all over again. On a good connection, you should be done in about 15 odd minutes.
Download Source
Good luck with coding. ;-)

Eclipse Incorrectly Claiming I have old Rev of Android SDK

Just to preface this I have searched high and low on the internet trying to find an answer to this problem and have yet to find one, there have been people with similar problems as me but not quite the same.
I have been trying to set up Eclipse with the Android SDK. I installed Eclipse (Classic) first and edited the .ini file to find the correct javaw.exe file. I tested eclipse and it was working fine. Then I downloaded the android sdk bundle extracted it and used the SDK manager to download the necessary SDK tools (Rev. 21) and the Android 2.33 API. After finishing that, I went back into Eclipse, clicked "Install New Software" and in the "Work With" field typed
"https://dl-ssl.google.com/android/eclipse/". From there I installed the Developer Tools and NDK plugins and then when finished restarted Eclipse.
Now when I start Eclipse I get the following error
"This version of ADT requires Android SDK Tools revision 21.0.0 rc9 or above.
Current version is 11.0.0
Please update your SDK Tools to latest version"
I know for a fact I have rev 21, it said it when I downloaded it and when I try to go in and update anything whether it be through Eclipse or through the manager it says there are no updates available. I know I have the latest of both the SDK and ADT and I have also tried using the version of eclipse that came with the sdk but that gives me the same issue.
The only other things which seem to set off red flags to me are
1. When the program loads it shows the following message in the console
"[2012-12-01 18:31:48 - Dex Loader] SecurityException: Unable to find field for dex.jar"
2. When I try and open the SDK manager through eclipse it never opens and the console displays the following message
"[2012-12-01 18:37:07 - SDK Manager] [SDK Manager] Error: Expected verb after global parameters but found 'sdk' instead."
I don't know if either of those two have anything to do with what is causing this issue but I hope someone knows what is going on. If someone could help me figure this out I would greatly appreciate it, thank you in advance.
(For reference sake, I have been following the instalation instructions in this tutorial
http://youtu.be/31cxmLN09ss)
When in the SDK Package Manager, try choosing Packages menu -> Reload. Then you should see Android SDK Tools rev21 available and ready to be updated.
i had the same problem. it occurred because once when I was trying to install the adt plugin few months earlier, the location had been saved. I oversaw the old folder location, mistook it for the current updated one and bam! that was all the reason. try to check back the location for tools folder specified.
As follow up to my previous suggestion, better solution is to modify your sdk location in Windows->Preferences->Android to where you install your ADT bundle. For example, if you install your ADT Bundle under C:\Tools\adt-bundle-windows-x86-20130219, enter C:\Tools\adt-bundle-windows-x86-20130219\sdk.
Doing this also fixes other issue with "Android SDK Manager" not launching from within Eclipse discussed on another thread.
I resolved the issue with Eclipse reporting that I have an older sdk even though I have the latest installed by copying the correct sdk version under "C:\Program Files\Android\android-sdk". First save existing "C:\Program Files\Android\android-sdk\sdk" to say "C:\Program Files\Android\android-sdk\sdk_old", in case you need to revert.
This (above) is sound advice: however I went in eclipse and redefined the android sdk location which apparently was on a different android folder for whatever reason which had outdated files in it and I believe now the situation is fixed I tried it and it worked for me too. Thanks.

Categories