Android SDK is not specified in multi-module project - java

I cloned a multi-module project from the Github with the following structure,
It has 5 modules like android, angular-client, design-impl, hub-spot-email and lastly, loan-calc-service. The moduels hub-spot-email, and loan-calc-service are the Spring boot app. When I tried to build at the first time, I get the pop-up to set the output path for the project,
Then, I have set the hub-spot-email/controller package as the output path (endpoint). This is the path set for the project,
/Users/Somename/IdeaProjects/eclipxgroup-master/hub-spot-email/src/main/java/com/quotecrunchers/email/controller
I have tried again to build and I get the error,
Error:Android Source Generator: [eclipxgroup-master] Android SDK is not specified
I have installed the Android SDK. The installation setup is correct as I checked earlier. In the next try, the error doesn't go away. I assume I need to set some path for the android module. I went to the preference section which seems like,
Also, the Java SDK is properly set though I get the error sings to the left of the files,
While I have some experience with the java and Spring xxx, I couldn't figure out what I need to do to build the project. Do you have more information what I need to do?
Note
So far I only managed to set the Android SDK for the project.

Related

Build errors when importing an existing project to Android Studio from GitHub

I am new to Android Studio so I am trying to edit an existing project to understand the environment.
My idea was to make an app to control an OBD device (for cars), I've found a lot of projects but I can't import them without receiving errors and errors.
So, currently, I'm trying with https://github.com/fr3ts0n/AndrOBD
Simply I've downloaded all the source and opened them with Android Studio
As soon as I try to launch the emulator it says: "Build failed" with 1 error:
Could not determine the dependencies of task ':android:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':androbd:debugCompileClasspath'.
> Could not resolve project: plugin.
Required by:
project: android
> No matching configuration of project :plugin was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
- None of the consumable configurations have attributes.
I can't understand how to make it works, thanks in advance
You need to download the plugin too, since it's in a different repo.
With git
git clone https://github.com/fr3ts0n/AndrOBD.git --recurse-submodules

After creating android project in Eclipse ADT, tons of errors show up

I'm using eclipse ADT (most recent version) to develop some android apps. I've followed the getting started tutorial at the dev.android.com and it worked just fine.
But when i tried to create another project with the same targets and sdk's, i've got nothing but errors:
Some errors and my sdk's:
That's the same sdk's i used before these errors started showing up.
What can be causing this?
EDIT: my project won't generate the R.java file
You might need to add a support library to your new project.
Check this link for downloading the support libraries -
http://developer.android.com/tools/support-library/setup.html#download
Please notice that you need to import them into your eclipse and then include one (preferably the newest, not sure about this) in your project.
EDIT:
Before downloading the support libraries you should first check if you have them already.
Try this, right click project folder in the eclipse package explorer, Properties>Android>Library>Add>select a library if you have one.
There might be an invalid library included in your project already, if that happens then you will see it in the Library>Add> menu, remove it and add a new one.
You might have clean your project ........
if yes.....you must check whether R.java file is present in **Project(your project)->gen->package name->R.java**
if not than u have to update Tool Folder in SDK manager

NoClassDefFoundError when referencing from an Android-Project to a standard Java-Project

I am currently working on an android application that needs to use some shared classes which are also used on some serverside.
So on the one hand I have this standard java project inside eclipse where I have some POJOs, infercaes and so on. And on the other hand I have an android application project with an activity that should use those POJOs.
My first try to get the android project to know the java project was simply adding it as a "required project" in the build-path properties inside eclipse. That resulted into:
java.lang.NoClassDefFoundError: my.package.Pojo
I googled it and tried a lot, but still the question stands:
How do I set everything up properly, so that my ADT v21.1 android project will still know my java project, even at runtime?
Some things I already tried that did not seem to change anything:
after adding the "required project" I also set the dependency to be exported under eclipse "Order and Export" dialog
I tried building the java project as a jar-file and adding it as a jar-dependency to the android project
I created a android library project as 'glue': I added the java project as a dependency to the library project and the library project as a 'android dependency' to the android project
I checked that all projects where inside the filesystem in the same parent folder (read, that the underlying ant task might have some troubles otherwise)
I googled for a loooong time
Would really be nice if someone could help. Maybe I'm just missing some tiny little thind?
Bluddy
The Problem is that I build the java project using Java 7 which seems to by not supported by android. 'Phix' pointed that out in his very helpful posting (he was also andwering himself):
https://stackoverflow.com/a/13304441/1145459
(answer by Bluddymarri, I just posted it here to help him get it closed)

How to get Eclipse code completion back after switching target to GoogleAPIs?

In order to make use of Google API GeoPoints in my Android app, I just changed the application target from this:
# In project.properties
# Project Target
target=android-8
to this:
# In project.properties
# Project Target
target=Google Inc.:Google APIs:14
After changing the target to Google APIs, it wasn't long before I noticed that code completion wasn't there anymore. Anybody know if it is possible to get Android API code completion when targeting Google APIs?
Update:
Just tried again and now I am getting code completion. Strange...
right click on project folder, go to properties, select android. set project target to 14 from 8.
restart eclipse if needed.
Check min sdk version in manifest file (it should be 14, if not make it),
then project or default.properties (change as you wrote in your question, if not there)

Android Eclipse Classpath - want to add classpath container path but eclipse won't let me

I'm using Eclipse to learn to develop Android applications in Java. I haven't used Eclipse before.
The project I'm trying to use (supplied by OReilly as part of 'Android Application Development') is MJAndroid. When attempting to run the project, the Run fails, and the Problems tab mentions com.java.Object can't be found, and Eclipse asks me to check the build path. Clicking
Properties -> Java Build Path -> Libraries, the message 'Unable to get system library for the project' is displayed.
On a working project, Properties -> Java Build Path -> Libraries has an entry for Android 1.1, which if I click Edit, has the classpath container path of com.android.ide.eclipse.adt.ANDROID_FRAMEWORK.
It seems a simple matter of adding the correct container path to my non-working project. However Eclipse seems determined to make this as difficult as possible. No matter what I chose to add - jars, externals jars, variables, libraries, class folders, external class folders, nothing seems to take the form of 'com.android.ide.eclipse.adt.ANDROID_FRAMEWORK' that the 'Android 1.1' entry on the working app has.
How can I add this namespace to my project so it resembles the working one?
I'm quite sure it's a problem with Eclipse's somewhat odd user interface. Frankly there' nothing I'd prefer more than a file to modify and set such information - my background is in Python, and the whole eclipse environment seems an unnecessary burden.
I had faced the same issue when I imported a sample code downloaded from the internet. I am using android sdk 1.5 with 0.9 ADT plugins. Here is a simpler way to fix the andoid library reference issues
Right click on the project which has
issues and select properties
Select the appropriate Android build
(1.1, 1.5 or 1.5 with google api) and
say ok
Again right click on the project and
select "Android Tools > Fix Project
Properties"
Fix the imports once (if required)
Refresh the project and you should be
ready to go without any manual
editing
I faced this same problem after importing a project through GIT. The problem was that I didn't have the same target android platform installed, and the build path somehow got corrupted.
The first obvious thing i did was changing the target sdk in the project.properties, but even after cleaning up the project and Android Tools > Fix Project Properties, it didn't help and I was still getting the build error.
My solution after wasting close to 1 hour trying to figure this out?
RESTART ECLIPSE
Everything worked fine after that. Eclipse is pretty fickle. Only through years of experience you'll then understand her well. :)
Had the same problem and it turns out the Android SDK Location was not set which was a really simple fix. Go to Window->Preferences, click on 'Android' on the left hand menu, fill in the location of the Android SDK (e.g. C:\Program Files\Android\android-sdk) and click OK. Everything worked fine for me after that.
Found the answer in this set up guide: http://developer.motorola.com/docstools/library/Installing-Android-Dev-Environment/
Sometimes Eclipse can get a bit funny (technical term) with classpath container resolution.
You have a working project in your workspace, so you can rule out plugin installation issues. You could try opening the .classpath file (hidden by default, select the triangle in the top-right of the Package Explorer view, select Filters... and uncheck .* resources) and manually adding the container declaration.
`<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>`
You may then have to close the project and open it again (right-click->Close Project) before Eclipse recognises the change.
You may also find that there is an Android builder and/or nature. If you compare the .project files for the working and non-working versions you may see entries for Android builders/natures. Copying the relevant entries may resolve the issue.
sometimes, eclipse can help you.
In Android projects, click right button on the project-> Android Tools -> Fix Project Properties.
It's usefull in class path errors!!
Luck!
I would verify you have the correct version of Java installed as well as the Android SDK. I would recommend installing/reinstalling the ADT plugin in your eclipse, makes it alot easier to create the android project.
http://developer.android.com/sdk/1.5_r2/installing.html
Also. I guess the path of the Android SDK must be setup correctly. This happened when I was overloaded with projects and I decided to create a new workspace copying some existing stuff into it.
Seems that the new workspace requires you to setup these details too once again
Is that setup properly?

Categories

Resources