ITelephony.aidl not compiling in eclipse - android

I am using the code of this answer, where as I have to add ITelephony.aidl to my project source, I did that.
But this aidl file not compiling. Is there any other step which are required?

First create a package in the src folder in your project named com.android.internal.telephony and within that package create a file and copy paste the interface ITelephony and save the file as ITelephony.aidl. When you compile you will get the .java file for the ITelephony in the gen folder.This is what I did and my issue got solved.
Hope this helps

If your aidl file is showing any error in eclipse then you should consider it and post the error here but if it is not showing any error you must clean your project and build it again. After this process you must go in "gen" folder and check either this file is compiled there and any class is exist with the same name of aidl file. If it is found, its mean aidl file is compiling properly.
Thanks and Regards,
Ali

Certin versions of Eclipse move the reference library folders for prjects.Either update eclipse, reinstall eclipse and the adt plug in or move the library within your eclipse folder.

Related

Android Studio How to fix cannot create class-file error?

I am following the steps mentioned here: https://priyankvex.wordpress.com/2015/08/30/how-to-build-tesseract-ocr-library-for-android-studio/
Step 3 tells to copy and paste the tess-two folder to my Project but when I paste, I get an error stating Cannot create class-file and none of my `.java' files get copied.
Where am I going wrong?
I don't know what the problem is but it works, if you copy the folder directly into the project folder instead of copying through the Android Studio.
Maybe for some reason the files are not copied in the Android Studio.
It is because some .class files are included in your copy files.
Some IDE will not include .class file in project and show this tips.

Error when importing Library in android

I am trying to implement Google Analytics in my android app for that I need to import one library. when I am trying to import that library it shows one error like
Could not write file: C:\Documents and Settings\ignite054\Desktop\i\Version
4\Project\PashuPalan\.classpath.
C:\Documents and Settings\ignite054\Desktop\i\Version 4\Project\PashuPalan\.classpath
(Access is denied)
How to solve this? please help me.
First copy the jar file from the android-sdk\extras\google\analytics_sdk_v2\libGoogleAnalytics.jar and add it into your projects libs folder.
The try to add library libGoogleAnalytics.jar to build path (in libs right click on libGoogleAnalytics.jar -> BuildPAth -> Add to Build Path).
Do not add anything in Manifest file and in your java file use Ctrl+Shift+O to automatically organize your imports.
Make sure that the directory and file is still there.
And, take a look that C:\Documents and Settings\ignite054\Desktop\i\Version
4\Project\PashuPalan is a valid path, has a .classpath file and it is readable.
Maybe .classpath file is hidden, removing the hidden attribute may resolve the issue.

Importing the desk-clock android project into eclipse

I copied the code onto my computer via
svn checkout http://desk-clock.googlecode.com/svn/trunk/ desk-clock-read-only
into the folder C:\Programming\desk-clock-read-only
I try to create the project via File/New/Other/Android/Android Project from Existing Source.
I select the C:\Programming\desk-clock-read-only path.
For some reason eclipse only wants to import C:\Programming\desk-clock-read-only\res.
The source files are in C:\Programming\desk-clock-read-only so they don't get imported.
There's just an empty src folder.
What do I have to do to import the project correctly?
I dont't know how the developer of this project managed it to run this but usually the java files belong inside the src folder and the manifest definitely not inside the res folder. If you change this Eclipse(or the IDE of your preference) might recognize it, but you'll maybe get some errors because just putting the java files inside the src folder shouldn't solve it. You actually need a package. Check your manifest for that.

Eclipse Import Custom Class from /src

Hey I'm having a pretty basic problem importing classes into my Eclipse based Android app. I have included the class directory into the /src directory where I figured the classes would be easily included, but Eclipse is saying it "cannot resolve the classes".
One thing I noticed is that the project folder that I included and the subfolders are just regular folder and not package folder icons. Is that a problem? If so, how do I change them to packages? This is an external git repo, so I'd rather not do anything beyond just including them in my project.
Here are some pics of how I set up the project to help:
The Activity where the error is:
Here is the package structure in the project, and the package called "android-utils" where the files I'm trying to import live:
Here is how I'm importing the files:
Btw, these classes are just some utils and I'll be improving and adding to them during the development process.
Let me know if you need any in more info to help me get these files imported the right way. Thanks!
Did you try dragging the .java files from Windows Explorer directly onto the package in Eclipse you want to put the new classes into? It should then ask to copy or link to files.
As your folder contains only java files Add them as Jar File in your Buildpath project, and your problem will be solved.
Also your jar file you can put it under the /libs folder
see this link to lean how you create jar file

Adding external Jar file to Android Application using Eclipse

I'm trying to add a simple jar file which contains some statics.
I have created a libs folder and copy the jar into. I have configure the project's build path in the Eclipse IDE.
In one of the project's classes i have a referance to one of the static members of the jar file, but it failde to build and the jar's classes are unseen to the application and the Eclipse mark it as an error.
How it can be solved?
Thanks,
Eyal.
http://developer.android.com/guide/appendix/faq/commontasks.html#addexternallibrary
I have solved the problem by using the libs folder for hosting the jar file.

Categories

Resources