How to set up Android CTS in Eclipse? - android

How should I set up Android CTS in Eclipse?
I have tried to follow the guide at Android Open Source Project for setting up CTS development in Eclipse. However, I get build errors when trying to set it up in Eclipse Indigo with android-2.3.7_r1 on Ubuntu 10.04 x86_64.
Eclipse refuses to build the project due to missing libraries. When these libraries are removed from the build path it still won't build, due to several hundred or so missing imports (for example import android.annotation.cts.Profile;).

I had the same problem during the instantiation of AOSP in Eclipse. javalib.jar for google-common_intermediates was missing and the second javalib.jar was also missing. In this case I simply removed the second library from the build path and the first library was simply renamed to android-common_intermediates. Maybe in your case, there are also some renamings?

Related

Unable to select JNI build variant after upgrading Android Studio to version 3.3

I have a Java Android project that includes JNI code written in C.
I often need to debug into the native code and before upgrading Android Studio to version 3.3 it was working.
Now in my project view I don't have any code in my cpp folder. I have confirmed that all of the C libraries are in the folder on my HDD. The CMAKE file is also missing from the project view but is also in the correct place on my HDD.
I have not changed any code from my source control since upgrading.
I am using
'com.android.tools.build:gradle:3.3.0'.
In the Build Variants section next to my JNI module I just have five dashes instead of the debug/production options.
I have uninstalled and reinstalled android studio too.
Is it possible after upgrading I need to add something to my configuration to correct including CMAKE?
I had the same issue, just figured it out. In AndroidStudio 3.3.1, they changed things around a bit I guess. Now you have to link your NDK build to the app you are building it as part of.
This is documented at: https://developer.android.com/studio/projects/gradle-external-native-builds
The section, "Use the Android Studio UI" is what you want.

Android ADT build path issue, how to fix?

I installed android adt with eclipse and appcompat v7 is showing error I tried almost everything i.e
1.change the build path
2.re installing the whole package
3.include the jar files manually
4.Updating the eclipse
Please check for the error in picture.
Please help me its two days I am struggling.
You have installed the higher version of jdk. just follow the below steps.
right click on project properties > click on java compiler, enable project specific settings and change the java version to 1.4 or lower.
If anyone getting the same problem delete appcompat_v4 from the libs folder when creating a new project

Eclipse Upgrade Not Working

My Eclipse out of the blue stopped building my Android so I removed the old version and have installed Indigo. When I try to import an Android project in I get this error:
Errors occurred during the build.
Errors running builder 'Android Resource Manager' on project 'ACCUWX_HoneyComb'.
java.lang.NullPointerException
Errors running builder 'Android Pre Compiler' on project 'ACCUWX_HoneyComb'.
java.lang.NullPointerException
Errors running builder 'Java Builder' on project 'ACCUWX_HoneyComb'.
java.lang.NullPointerException
Please help!
Try removing the .metadata folder from your workspace. This holds all your configurations, even after a new install. I think if you just delete this folder, assuming everything is in place, you should be up and running again.
The 21.0.1 version of the Eclipse ADT tools has a bug that prevents a project building if you have any files without extensions in them. This is a particular problem for users (like me) using subversion which has extenion-less files.
The solution is to install the 21.1 preview version of the ADT tools and SDK manager from Google. Clear instructions can be found here and you can read all the background add your voice to the angry mob of developers here.
This happened to me today with ADT v21.0.1-543035 and it turned out to be the .svn directories throughout the directory structure. See http://code.google.com/p/android/issues/detail?id=42051
Worked around the issue by upgrading svn client and working copy to 1.7.
For me, the source of the NullPointerException problem was a host-side Junit test project that references (and tests) code from an Android project. It didn't have a project.properties file. It's not an Android project, but for some reason the newer version of the SDK somehow expects the file there. To fix the problem, I just copied a project.properties file from an Android project to the host unit test project.
I had something similar. The problem was created by having some files without extension inside the /src folder.
In my case, a branch tool, changed the encode of the file project.properties, I changed the encode to Windows-1265 and the problem was solved.
I had the same issue and fixed it by following comment number 6 in this page:
Issue 42051: Subversion folder causes NPE in PreCompilerBuilder
Let me quote the comment:
Solved it by installing subversion support packages for eclipse:
http://gan.so/VgYT
It's still a bug but...
same problem here, I closed Eclipse, manually removed any files in folder gen for the project, started Eclipse again, and made a build.
For also me, the source of the NullPointerException problem was a host-side Junit test project that references (and tests) code from an Android project. It didn't have a project.properties file. I added it and problem got fixed.
I found the solution on this website(https://code.google.com/p/android/issues/detail?id=68755)
So basically, what we should do is :
Bring up $ADT_DIR/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini in an editor. Before the -vmargs line, insert these two lines:
-vm
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java
you can find the eclipse.ini following this
(On a Mac OS X system, you can find eclipse.ini by right-clicking (or Ctrl+click) on the Eclipse executable in Finder, choose Show Package Contents, and then locate eclipse.ini in the MacOS folder under Contents)
Upgrades did not work for me (on Linux), so I just installed IntelliJ Idea (build 123.155). Had to modify idea.sh to set JDK_HOME=/usr/lib/jvm/jdk1.7.0 (the Oracle JDK) and to select [menu] -- Run -- Run... -- Edit Configurations... -- Target Device -- USB device to make it work with the real device.

Significance of com.android.ide.eclipse.adt.LIBRARIES in build path?

I've update to the latest SDK(4.0.x), tools(r16) and plugin(16.0.1) for Eclipse. I notice that now nearly all my projects in Eclipse have the library mentioned in this question's title showing as a referenced library in the Libraries tab of the Java build path. This is relatively new, though I'm not sure in which upgrade of the SDK it appeared.
It's not causing any problems but I'd quite like to know what its purpose is?
Interestingly it does not appear in projects which I also build using Ant from the command line. In these projects I send the Ant built binaries to a folder outside the Eclipse workspace. These projects naturally have a build.xml, an ant.properties and a proguard.cfg in the project root. This I suspect has something to do with why the com.android... library isn't in the build path. These projects build perfectly OK when built under Eclipse.
None of my projects are library projects.
Update: If I delete it from the Java build path, it appears to have no ill effects, in so far as the app still builds (even under Eclipse) and runs OK.
If you have any "Android Libraries" set in the Android section of the project then these are for linking in those libraries (the jars that the plugin will build)

Could not find ****.apk + android

Whenever i am trying to run my project, i am getting this error in the console.
"Could not find **.apk"
Operating system: windows XP
IDE: Eclipse SDK
Version: 3.4.2
Build id: M20090211-1700
Android: 1.6
ADT: ADT 10.0.0
FYI: it is only happening with a single project, other projects are running fine..
I think this can happen when you rename the library project out from underneath the dependent project. Eclipse is reasonably good about about updating dependencies in most cases but this one seems fragile.
First try removing and then re-adding your library in Project > Properties > Android > Library.
If that doesn't work try cleaning your projects, exiting Eclipse, and opening the ".classpath" file in your project's root directory. If you see a line that references your library project under a previous name, just delete it, save the file, and relaunch Eclipse. Build the library project and then your dependent one. You may need to re-add the library like I mentioned above. This is what worked for me at least.
Edit note: I also found some stale references in my .project files. They didn't seem to be causing any problems but I removed them too. If you do that, be sure to search for the old name in that file as there was a whole "link" section near the bottom that also referenced it.
Make sure after updating your android sdk sdk build tools are updated properly.
You can check it by Open sdk manager -"Android Sdk Build Tools" status must be installed.
if the status is not installed then install Android Sdk Build Tools for the same.
restart your eclipse and try again
check this it might be helpful to you
Make sure your project imported the Android 1.6 library correctly. That is, under your project, you should see 'Android 1.6', which expands and displays 'android.jar'.
If it says Referenced Libraries > android.jar, you will need to fix this by manually altering the .classpath for the project.
Open .classpath for the project and type the following:
The important line is the 3rd classpathentry, which is the actual link to the Android SDK libraries.
source
clean your project and check . eclipse is not building apk file.
check this thread. It might help you.
http://groups.google.com/group/android-developers/browse_thread/thread/2c3e45540b915945/f06e10bcda3ad68b?lnk=raot&pli=1
Run eclipse as administrator and then import your project
Update Android SDK, is what did it for me.
I was building a game with the LibGdx Framework and got the same error. I tried several solutions from various posts at stackoverflow and others.
Found help in a post at the LibGdx Forum:
http://www.badlogicgames.com/wordpress/?p=3010 Posted by Mario, on May 18, 2013
Just updated to ADT 22, so should you. However, the process wasn’t all that smooth. What you need to do:
Update the ADT plugin in Eclipse (Help -> Check for Updates)
Open the Android SDK Manager, either from within Eclipse, or from
your Android SDK folder
Fetch all the updates
Fetch all the updates again
Fetch the updates one more time…
The end result should be an updated ADT plugin, as well as up to date SDK packages. Make sure you have all three of the ones in the following image, with the exact version numbers.
I needed to update them only once and from there on it worked.
Even if this post is outdated I figured I'll share this, because I lost a day finding nothing.
I experienced that problem, too, when I created an android project that was using an android library. Obviously I didn't know how to incorporate a library into an application the right way. I wrongly used project dependencies (Java Build Path/projects) or adding a library (Java Build Path/Libraries). While all I had to do was go to the Android tab and import my android library by means of the add button from the Library section.
I am using PhoneGap and I checked several solutions about configuration (properties, build path). However, my problem was that I tried to run everything with the default setup for Eclipse. Then, I solved it going to the SDK manager to install: Android SDK Build-tools, and it worked.
Mine was caused by this problem (incompatibility between ADT and SDK), and was fixed thus:
Eclipse > Help
Install New Software
Add 'https://dl-ssl.google.com/android/eclipse/' to 'Work With'
section and press enter
After developer tools appears on the list, check it and click Next
Restart eclipse once download is finished
Make sure put correct SDK Location (I have 2 instances of SDK and update wrong once).

Categories

Resources