Stephen Black

Ranch Hand
+ Follow
since Aug 13, 2009
Stephen likes ...
MySQL Database Chrome
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
1
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Stephen Black

The reason that nobody has asked yet is becuase this problem
only existed for such a short amount of time.
The latest Android Studio does not even have or require a .bat file
so this solution is outdated
I therefore think that it is best that this information NOT be in the wiki

Unfortunately I was unlucky enough to install Android studio just when the problem existed
9 years ago
I have found a problem with the Android Studio studio.bat file
and here it is

Do you see the problem in the last 2 lines of code?
It seems that if your environmental variable is %JAVA_HOME% the batch file will GOTO error
and an error message will be displayed and that's it NO ANDROID STUDIO FOR YOU,
even though %JAVA_HOME% contains a valid path, but if the environmental variable is something like
%ANDROID_STUDIO_JDK% like mine is because I created it myself then it will work

PROPOSED SOLUTIONS
(1) Edit the batch file
Where you see this

Change it to this

(2) Create an environmental variable named %ANDROID_STUDIO_JDK%
as shown here
https://kb.wisc.edu/cae/page.php?id=24500
9 years ago
Just stressing what I said in my previous post it is VITALLY important
that ALL of theose .Android .Eclipse scattered throughout your work spaces must be completely removed
I deleted every trace of eclipse and Android before I re installed and I used this information to help me do it

Remove Eclipse completely
Completely Remove Eclipse from a Windows 7 PC

I have found that if you don't install with everything cleaned out it causes lots of errors
9 years ago
I also I also realise that the .Eclipse folder that is located in the username folder
contains the registration of all the plugins.
If it was edited or deleted maybe it would make the Android Development Tools go away
at least untill you replace it with a working verstion of ADT
9 years ago
This is where I am up to.
I installed the Android Development tools separately using one of those
uninstaller programs in particular Revo(R) Uninstaller Pro
This means that WHEN (I am confident this will happen again) the Android Development Tool goes crazy
I will just uninstall it using the uninstaller program and it will uninstall cleanly
Leaving a stand alone version of Eclipse functioning perfectly but just not doing any Android things.

I just hope that it will work just as well as I say it will

I could even go as far as crating incremental (local) backups of the system
but If I were to do that I would also need to remember to back up those .android and .eclipse files that are
in every users filesystem (I think)
9 years ago
I have one last theory
I think the problem occurs when using the Android SDK Manager
I believe that if you want to upgrade a component of the SDK you must UNinstall
the previous version of that component bevore you install the upgraded version

For example in the SDK manager I just uninstalled SDK Platform tools before
I install the latest version of SDK Platform tools

Also I have another hunch that updating the SDK as often as possible helps

Also I think that when your updating the SDK you should knock on wood and throw some salt over your shoulder
(ok maybe that is just a little ridiculous)

PS as for Android Studio I might just wait till it matures some more

9 years ago
If there was a way to keep the Eclipse IDE and the Android SDK separate
It would be easy to uninstall then reinstall the Android SDK, but it's not that easy
It seems that even if the IDE and SDK are installed separately they become inseperable
such that you can't remove one without breaking the other.

I have just installed Android Studio (and updated java for good measure)
I am hoping for better results from the studio
-----------------------------------------------------------------------------------


9 years ago
I think that the uninstall re install may be the way I tackle this problem
If I could find a way to keep the Android part separate from the Eclipse part so that I can just delete it (and say a prayer) when this problem happens again (and I know it WILL happen again) that could be good
Otherwise I could try Android Studio but it is a beta and could cause more (and different) problems
PS I was using Windows 7

Steve Luke wrote:I had the same problem on Linux. I couldn't find a means of fixing the issue through the normal conflict resolution mechanisms in Eclipse, so I tried to uninstall the Android plugin (the plan being to re-install version 23). But instead uninstalling the Android plugin ended up uninstalled the entire Eclipse platform. Lovely, no warning, just full uninstall. The first I knew of it doing the complete uninstall was when it tried to auto restart and said it couldn't find the application. Manual searching also found that the entire Eclipse bundle had been removed. So I don't suggest trying to remove the Android plugin.

I had to download and re-install. And lost all my configuration of course. Nothing I love more than re-configuring the formatting the way I like.

9 years ago
because apparently that is the "correct" way to do it

Then when I try to install the ADT package I get this error




So I guess that means that I have to delete the current hierachyviewer package by hand

I have discovered that if I go help -> About ADT I can delete Android Developer Tools from the eclipse environment

Ok I tried that now let's see what happens

ADT is persistent and won't be deleted

Now just thinking that If I had installed eclipse in one folder and Android development tools in another i could maybe
Just delete and replace the Android development tools folder in order to upgrade
I wonder if this would work or whether it would break something?

Ok im out of ideas can anybody help?
9 years ago
I have been given this exercise to do as quoted
"Create and activity with two layouts . In one , implement a List fragment. when a user clicks an Item in the list Fragment , change the fragment displayed in the second layout."


but line 35 or most likely line 36 throws a Null pointer Exception
This makes me think that the TextView cannot be referenced because it is in another layout?
This then makes me wonder how I can reference the text view called textViewChange
This also makes me think that I should include a copy of the xml

Thanks in advance
10 years ago
Thanks for that it worked
NOTE TO SELF Do not reference a class that uses import x when the referencing class imports a compatibility version of x
10 years ago
I have an inner class like so

but Line 12 isn't being recognised as a Fragment the exact error message is actually for line 10 which says
1. Multiple markers at this Line
2. the return type is incompatable

I thought that if a class extends Fragment then it would be a fragment so I checked the original class

and Yes it extends Fragment

10 years ago
Resolution
If you notice in lines 2 and 3 (49 and 50 in the original)
I tried to add the tabs to the action bar
and then in lines 5 and 6 (52 and 53 in the original)
I tried to add the listener to the tabs

In this case it actually matters what order you try and do things in
Before you add a tab to the action bar it MUST have a listener added to it
otherwise you will get an exemption at run time

ALSO I placed the code for the NavTabListener class in a more sensible place
I placed it in the main body of the DynamicFragment class rather than placing it in the middle of
the onCreate() method
The Finished Code





10 years ago
after much Goggling and RTFMing I still don't understand how I am supposed to supply a callback in this code so that android will stop throwing an exception at runtime
The error is that Actionbar Tab(s) apparently don't have a callback
Only the code up to line 54 should be applicable?

10 years ago
I am looking for
1) a patterns catalog for general java programming Is the the Gang of 4's catalog still the best
2) something about debugging and testing (java)
11 years ago