JDK driving me mad!! please help - Android Software Development

Ok so i ran into some problems today after updating eclipse and JDK.
when opening sdk manager i get told java not found in your path then it finds it in program files and tells me to reflect this in user variables path which i already have. what is going someone please helpme before i put my fist through the comp screen!!
I am running win7 home premium 32bit
I also tried the zip sdk revision 8 and still get the same message seem ok going into sdk manager but on exit it gives me this message

cyberpedz said:
Ok so i ran into some problems today after updating eclipse and JDK.
when opening sdk manager i get told java not found in your path then it finds it in program files and tells me to reflect this in user variables path which i already have. what is going someone please helpme before i put my fist through the comp screen!!
I am running win7 home premium 32bit
I also tried the zip sdk revision 8 and still get the same message seem ok going into sdk manager but on exit it gives me this message
Click to expand...
Click to collapse
Control Panel -> System -> Advanced -> Environment Variables
Make sure your Path= has the JDK directory in it.... odds are your old one is still there and its not pointing to the new JDKs folder. (Just saying it again even though you said you already did).
Remove all traces of old java installs and try again -- including adding it to the path..... Sometimes the JDK can be a real PITA, but usually most of the issues occur in 64bit versions.
Did you uninstall Java JREs you had installed before the JDK as well?

Related

[GUIDE]Install Android SDK and upgrade Marketplace to 2.2.6

FIRST OF ALL, I CAN NOT BE HELD RESPONSIBLE FOR ANY DAMAGE YOU DO TO YOUR DEVICE! PROCEED AT YOUR OWN RISK!!!​
Now that we got that out of the way...
I have noticed that some people`s Marketplaces simply refuse to update by themselves (exactly what happened in my case) and as most of the people visiting this forums are not tech-savvy and simply want a step-by-step guide to get things working, I decided no harm can be done by me posting this info.
Installing Android SDK revision 8
First of all, you will need to have Android SDK (and ADB of course) installed with the drivers ready to go. In order to get the SDK installed go to the official Android website and download the latest revision (r08 at the time I posted this). You can download any of those files, but I prefer using the executable installer so I can make sure everything is at its place. Now, there are two major flaws with this whole process which have almost made me quit the whole process several times, but I got them sorted out and will help you solve them aswell.
FLAW #1: After beginning the installation process, the installer will prompt you to download a JDK (Java Developer Kit) in order to continue installation. Hit the "Visit sun.java.com" button and download the latest Java SE (currently this one). But before proceeding be sure to download the 32 bit one, as the Android SDK only recognises this version. I know it`s not a big deal, but I spent about two hours trying to figure out what the heck went wrong and it became quite frustrating.
Install the JDK, then the SDK. Once Android SDK is done, simply go ahead and launch SDK Manager (you can find it in Program Files\Android\android-sdk-windows\) and when you get to choose the packages to install, simply check "Accept All" and click "Install". Once it`s done, it`s time to download the drivers. Click "Available packages", tick "Third party Add-ons" and under "Google Inc. add-ons" you should find "Google Usb Driver package". Tick it and click "Install". IF YOU GET AN ERROR SAYING THAT PERMISSION WAS DENIED AND YOU ARE UNDER WINDOWS 7, COPY THE WHOLE "Android" FOLDER CONTAINING THE SDK TO YOUR DESKTOP (OR ANY OTHER PLACE) AND REPEAT THE STEPS ABOVE. I know it`s quite rudimentary, but it does its job. Once it`s done, a folder named "google-usb_driver" will be created under Android. Be sure to correctly copy it to the original location in case you had permission issues.
FLAW #2: Ever since Android SDK r08, Google decided to remove the ADB files so now they have to be manually placed in the folder. I have uploaded them for you, so click here to download them. Once downloaded, extract the archive to the "Android\android-sdk-windows\tools" folder.
OPTIONAL: Go to Start Menu, right click on Computer, click Properties. The System window will appear, where you need to go to "Advanced system settings". Once there, click on "Environment variables" and where it says "System variables", look for PATH. Once found, highlight it and click "Edit..." then add the line "C:\Program Files\Android\android-sdk-windows\tools;" at the end. Click "Ok", "Ok" and "Ok", then restart your computer.
Right now everything should be working as expected. Connect your HD2 to the PC via USB and hope for the best. If the drivers are working and it is recognized as a HTC device, open a command prompt and type "adb devices". If you get anything such as "List of devices attached" followed by some code such as "0123456789ABCDEF device", everything is working well. Good job, you just correctly and completely installed Android SDK on your PC!
If not...
Check your device manager and if you see any devices related to your HD2 having problems, simply right click on them and update the drivers with the ones downloaded earlier in the "google-usb_driver" folder then reboot your computer.
We`re all set! ...What now?
The whole process is actually quite simple. First of all, download the new 2.2.6 Marketplace and put it somewhere accessible, such as your desktop. Open a command prompt and enter the following:
Code:
adb remount
adb shell
rm /system/app/Vending.apk
This will basically delete the old Marketplace from your device.
Now go to the folder where you placed the new Marketplace, hold down Shift, right-click and select "Open command window here". A command prompt should pop up at the exact location. Now execute the following command:
Code:
adb push Vending.apk /system/app
And that is it! Now restart your device and try to run your Marketplace, it will load for half a minute or so then it will start normally. Enjoy!
I know this is rather a tutorial for installing the SDK, but I figured it would be useful to let everyone know how I managed to solve my problem. In case I skipped any steps or you notice anything wrong/wish to add anything, please feel free to do so!
If you feel my post has helped you in any way, do not hesitate to hit the "Thank" button!
Reserved post for further mini-tutorials.
At least on my r08 install if you install the platform tools component then adb will be available under the platform-tools directory (moved from the tools directory).
@OP
Did you test this on a non sense build?
This procedure will most likely not work with Cyanogenmod ROMs. That and I'd suggest you give the newest market version (2.2.7) instead. I'm not willing to destroy my ROM again by trying it on CM.

Could anyone Help?

Hi,
I am currently trying to get into Android Developing and I am following a tutorial book called "Practical Android Projects" however, I have only got so far and I am coming across a problem.
I have installed the Android SDK and required files, and installed ant as per instructions here: http://ant.apache.org/manual/install.html (Under Windows and OS/2 section)
I am getting an error about my /res folder not existing, when it infact does exist, in the directory it specifies?
Please see screenshot at the following link: http://server3.uploadit.org/files/StuMcBill-cmdprompt.jpg
Thanks for any help you can give?
I am running Windows 7 Home Premium x64!
Stewart
I would suggest using eclipse. Especially for beginners it is alot easier than building everything on console.
It has nice plugins and the android emulator from the sdk is integrated.
100% agree with Dark3n.
Ant is a programming language in and of itself. (Well sort of a scripting language but whatever).
No need to try and learn two things at once. I'd suggest wait until your 2nd or 3rd app at least to learn Ant. You really don't need it unless you want to use something like ProGuard. (Which is yet another thing to learn and another thing I'd suggest waiting on).
Oh an for a possible quick fix type
>ant clean
And see if that helps.
EDIT:
Err nevermind -- looked at your screenshot... why are you running ant from the System32 directory? Is your Android project really in that folder?
Usually you set the path environment variable in your system properties in windows to add ant to the list of paths, so you can run ant from any folder.
Then you can open that folder, type cmd in the address bar and open a command prompt in your project directory. You then run ant from there which reads the build.xml file an default.properties and local.properties files in your android project folder.
OK, I will give eclipse a try.
RE system32 and ant: Well the book I am following said to use ant, and I just followed the instructions and it installed the project in System32.
Could I just substitute Eclipse for ant while following the guide?
I do have Ubuntu installed on this computer, would that be better / easier?
Eclipse is available for any OS.
Use the one you are most comftable with.
I think eclipse might even use ANT internally but you don't have to hassle with it.
Working in system32 is not adviseable, you should generally keep out of there .

[TOOL] pySignare - Quickly Sign APKs [Windows]

pySignare
"-to sign"
v1.0​
Version 1.0
Complete re-write into python.
Prerequisites
Windows (for now)
Java
Get Java here --> https://www.java.com/en/download/
Python 3.x
Get 3.3.4 here --> http://www.python.org/download/releases/3.3.4/
Instructions
Download
Extract
Copy Unsigned APKs Into "UnsignedApks"
Run "pySignare.py"
Follow On-Screen Prompts
Thats It
Future Development
Make X-Platform - (Shouldn't be too hard)
Minor code tidy up
Currently its bundled with TestExample.apk (just an empty renamed zip) so it can be tested straight away.
DOWNLOAD HERE (Download ZIP - Right hand side)
Please post your experience, and if you encounter any errors, let me know and I'll attempt to fix.
FAQ
Q. I get the error - 'java' is not recognized as an internal or external command, operable program or batch file.
A. You either, do not have the Java installed or have not added java to your PATH in Environment Variables. Either install Java or add Java to your PATH.
Thanks dude.
Any feedback, problems or suggestions?
wow it works! Easy to use! thanks!
Thank you.
Are there any Linux wizards out there who can help me port this?
New version 0.3 available.
tried it all i get is cannot find specified path
edit: forget that i fixed it had to modify the it as im using jdk 1.7.0
I don't know why I changed it, but in v0.3 it assumes you have installed the Java Development Kit (JDK) on a 64bit system (it mirrors my system rather than a universal approach).
If you have java added to your windows PATH, try using these files, just extract these to the same directory and run these instead.
works great! small suggestion is for the batch file to ask for the location of your jdk.
also have error checking as the batch said it worked but didnt at first (due to the location of the jdk)
andyharney said:
I don't know why I changed it, but in v0.3 it assumes you have installed the Java Development Kit (JDK) on a 64bit system (it mirrors my system rather than a universal approach).
If you have java added to your windows PATH, try using these files, just extract these to the same directory and run these instead.
Click to expand...
Click to collapse
I am using a 64 bit system I have jdk on both program files 64 bit and (x86) and the path in the test keys ran to jdk 1.6.0_25(x86) so I used notepad ++ edit it to 1.7.0(x86) tried again it signed and zipalinged no problem
Sent from my Desire HD using XDA App
Your right, I wrote this quickly to fulfil my needs on my system.
I will update to v0.4 with error checking & JDK checking soon.
Thanks for the suggestion.
EDIT: Seems you beat me to the reply leith. If your JDK is added to your windows path then it shouldnt matter whether its 32 or 64 bit. When I updated from v0.2 to v0.3 I used my personal build rather than the universal "java" approach. I can see that as explicit paths are specified in the .bat. v0.4 will add error checking and will most probably include a stripped out java package.
awesome! keep up the good work dude
andyharney said:
DOWNLOAD HERE
Click to expand...
Click to collapse
unable to dl now: Fatal error: Method ExceptionDisplay::__toString() must not throw an exception in /home/aharney/public_html/index.php on line 644
?
Try using a different browser, that error is quite rare and unique to certain localised versions of windows + firefox.
Version 0.4 now out.
Flawless victory brilliant Andy
im no stranger to signing apks
both of us know this tool is the best
better than any other signtool
never gonna give this up
not gonna desert this tool...
I saw what you did there. Version 0.5 will replace icon.png in every apk with a png of his face.
I can't download the file
Forbidden
You don't have permission to access /index.php on this server.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Click to expand...
Click to collapse
Yeah, I had to take the site down again. Been hit with 2 DDoS attacks in the last 3 days. I don't know why.
I will have it back up at some point tonight. I will PM you when its back up.

Android SDK issues

Ok, I have had multiple Android devices and have never had a problem with any of them with adb however, my computer had done some weird thing and every time I opened SDK Manager, it would open, but then time out and freeze..
SO.
I uninstalled both java development kit, and sdk manager, but now the manager wont open at all.. It just flashes a command prompt and exits out... So I ran the android.bat batch file in a command window, and i got this error
'xcopy' is not recognized as an internal or external command,
operable program or batch file.
ERROR: SWT folder 'lib\x86_64' does not exist.
Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.
If anyone can help me, I would be much appreciated, I just got two new devices this month. I was able to root my SGS2 before, and now I am trying to root my Kindle, and all this is happening... Any help would me much appreciated...
Oh, and I did check my system32 file, and I do have xcopy in my system files
UntamedDeviance said:
Ok, I have had multiple Android devices and have never had a problem with any of them with adb however, my computer had done some weird thing and every time I opened SDK Manager, it would open, but then time out and freeze..
SO.
I uninstalled both java development kit, and sdk manager, but now the manager wont open at all.. It just flashes a command prompt and exits out... So I ran the android.bat batch file in a command window, and i got this error
'xcopy' is not recognized as an internal or external command,
operable program or batch file.
ERROR: SWT folder 'lib\x86_64' does not exist.
Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.
If anyone can help me, I would be much appreciated, I just got two new devices this month. I was able to root my SGS2 before, and now I am trying to root my Kindle, and all this is happening... Any help would me much appreciated...
Oh, and I did check my system32 file, and I do have xcopy in my system files
Click to expand...
Click to collapse
I'm not sure why you'd be running the android.bat file? It's not really required to get things working. I have no idea why the SDK Manager would be hanging, but if you really want to have that, then I'd do a full uninstall of everything, reboot, and then try again. Did you download the SDK from here?
Technically you don't HAVE to install the SDK to get access to the Kindle Fire. You only really need fastboot.exe, and adb.exe, and the Android drivers. All of these are available in a single download via the following post. You also don't have to use the actual utility if you don't want to, although it is actually quite cool and recommended if you are new to this.
sl0ttedpig said:
I'm not sure why you'd be running the android.bat file? It's not really required to get things working. I have no idea why the SDK Manager would be hanging, but if you really want to have that, then I'd do a full uninstall of everything, reboot, and then try again. Did you download the SDK from here?
Technically you don't HAVE to install the SDK to get access to the Kindle Fire. You only really need fastboot.exe, and adb.exe, and the Android drivers. All of these are available in a single download via the following post. You also don't have to use the actual utility if you don't want to, although it is actually quite cool and recommended if you are new to this.
Click to expand...
Click to collapse
Thanks, I appreciate that... I was only trying to run android.bat because it is what SDK Manager first runs when it first boots and that is why SDK won't boot... I have tried a full uninstall, reboot, install, reboot... But I have done this for a while, so I am really comfortable with adb, so I will just get the files there... Thank you for those links.. I will do it that way, something to make it easier for always helps
EDIT:
I must have messed with something in my system settings somewhere to corrupt a bunch of stuff... I did a system restore to the 18th of December, reinstalled, and everything works perfect now... Oh well! Haha

SDK Manager won't start

Hi, i'm having troubles to open the SDK manager. I have Windows 7 64-bit and i Installed de jdk 1.7.0_25 64-bit. This are the solutiones i've tried but with no success:
Installing SDK in c:\
Adding JAVA_HOME enviroment variable to the system pointing to jdk1.7.0_25
Adding JDK_HOME pointing the same place...
adding c:\program files.....jdk...\bin; to Path in enviroment variables
Editing few lines of android.bat file like:
Code:
set java_exe=
call lib\find_java.bat
if not defined java_exe goto :EOF
to
Code:
set java_exe="c:\Program Files\Java\jdk1.7.0_25\bin\java.exe"
Downloading the version that comes with eclipse... same results..
Finally i tried with Android Studio but when i try to open SDK Manager inside this program it comes an error that say:
ERROR: No suitable Java found. In order to properly use the Android Developer
Tools, you need a suitable version of Java JDK installed on your system.
We recommend that you install the JDK version of JavaSE, available here:
http://www.oracle.com/technetwork/java/javase/downloads
If you already have Java installed, you can define the JAVA_HOME environment
variable in Control Panel / System / Avanced System Settings to point to the
JDK folder.
You can find the complete Android SDK requirements here:
http://developer.android.com/sdk/requirements.html
As it writes you this
ERROR: No suitable Java found. In order to properly use the Android Developer
Click to expand...
Click to collapse
maybe it wants 32-bit Java for you 64-bit system anyway?
Like an obvious hint: Try 32-bit Eclipse 32-bit Java and 32-bit ADT plugin in you system. It should work.

Categories

Resources