Pages

Showing posts with label link. Show all posts
Showing posts with label link. Show all posts

Wednesday, April 20, 2016

Multiple Ways of Programming for Android

These seem to be more than one way to program for the Android devices.

The first and the most common way is by using the Software Development Kit (SDK) using Java Syntax. This is what I have been talking about in all the earlier posts and tutorials.

The other 3 interesting ways, I believe, are:
2. Native Development Kit using C / C ++. This I am sure many are aware of and would be using to some extent. This is a little more closer to the OS, not running on top of the virtual Machine.
3. RenderScript using C99 - used to write faster graphics code like the Google Books page turn animation etc.
4. Android Scripting Layer using Python etc.

Interesting options, right?
Read More..

Tuesday, February 9, 2016

Android Eclipse link Error New Project

I set up a new environment on my new laptop with Windows7 and jdk1.6.0_21 version. Did the initial setup with eclipse installation, android SDK installation, installing the ADT plugin on eclipse etc. I then imported all the android projects I had created so far. It worked perfectly fine.
Next I created a simple project without any custom stuff, it failed to create with a link error as shown in the image below:

After much trial and error, setting up everything afresh, changing or creating a new workspace, nothing seemed to work. I noticed that the Android package was not visible in the Java build path that you get to see in the project properties. So, finally I found a manual workaround to overcome this problem if you mandatorily want to continue working in the same workspace
Solution: Same workspace:
The manual resolution I found is to make a classpath entry in the .classpath file outside the eclipse environment.
The .classpath file may have such an entry before you edit it:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
     <classpathentry kind="src" path="src"/>
     <classpathentry kind="src" path="gen"/>
     <classpathentry kind="output" path="bin"/>
</classpath>

So add an entry for the android framework to be included as shown below:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
     <classpathentry kind="src" path="src"/>
     <classpathentry kind="src" path="gen"/>
     <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
     <classpathentry kind="output" path="bin"/>
</classpath>

What actually corrupted my workspace, i have not yet figured out. However, while searching on the web for all possible solutions, I came across the announcement on the eclipse forums that Eclipse 3.3 to 3.6 on windows platform is not stable with the JDK version -  jdk1.6.0_21. Hence we need to either roll back to patch 20 or upgrade to 22. I have upgraded and see that eclipse is far more stable now.
Please see this link for more details on the windows and jdk problem mentioned above:
http://www.eclipse.org/forums/index.php?t=msg&th=171988&start=0&
Solution: Different or new workspace:
Just upgrade your JDK to jdk1.6.0_22 and point eclipse to use this as the default JDK. Create a new workspace and you are done. It fixes the problem.
Hope this helps many not to waste time on searching a solution that is not to do with the way you are coding but with the environment set up itself. I had to spend quite a bit of my precious time before figuring this out. 
Read More..