How to solve red explanation mark in eclipse project - android

When i open existing project of eclipse it will be show red explanation mark on project name
here is my screen shot of project folder
And my project properties screen shot is below
so how to solve the android dependencies in this
So how can i solve this error

It means there is a problem with the build path in your project. If it is an android project then it mostly means the target value specified in project.properties file cannot be found. This can also be caused because of other kinds of built problems. But it is shown mostly for built problems only. See here for more details. It is about built error decorater seen in eclipse.

Related

Android - Exclamatory Mark Near Project Name

I recently updated by Android SDK and now if i create a new project, i see a Exclamatory mark near my project name.
I Tried the solution in below links.
Android:Error an Exclamation mark in my project how to resolve it
Android eclipse - Exclamation mark next to project name
After adding the correct library, i see R.java not getting generated. Tried cleaning and building the project multiple times. But still the same issue.
Need help on fixing this issue.
My Target SDK Version - 19 and min SDK Version is 8
Eclipse Version - 4.2.x
After adding the correct library, i see R.java not getting generated.
This implies that there is some error in your XML files.
Check the following in the order.
Name of all XML files should not contain capital letters.
In Values folder, in styles.xml file, try removing parent="Theme.AppCompat.Light"
After doing this, clean the project and build it. Check the Console window to see what error it throws. Make the corresponding change. It should fix your issue.
This is usually an issue with an XML file providing the libraries aren't throwing any errors. You can check the "problems" tab in Eclipse to see where the errors are coming from. Most likely, it's with an XML file and once you fix that error R.java should compile and your project will be fixed.

How to fix NoClassdefFoundError

I'm a newbie with both android and eclipse, so if you can help me, please don't assume that I know very much.
I have downloaded kankan.wheel and I'm trying to run the demos. I built the demo project in eclipse, using Android project from existing code. The project compiles without error, but crashes with a NoClassdefFoundError exception when I try to run it. The main menu comes up, but when I press a button to run a demo, the app crashes. I posted a screenshot of the the error message in context at https://dl.dropboxusercontent.com/u/24746182/except.png
I have added the wheel.jar file to the assets folder, and placed it on the build path. I've also checked wheel.jar in Order and Export. (This makes no sense to me, but I see this suggested in answer to similar questions.)
What have I done wrong, or failed to do?
Is there some reason why eclipse wouldn't just build a runnable project?
This is an update after trying the suggestion people have made. I still can't get it to work, so I'm afraid that I'm overlooking something so obvious that no one's thinking to tell me. Here is what I did.
I downloaded and unrarer a rar file with the wheel library and a wheel-demo project.
I created the wheel-demo project in eclipse, using new android project from existing cde.
I added a libs folder to my project, and copied wheel.jar into it.
I right-clicked on the wheel-demo project in Project Explorer, and chose java build path.
I clicked on "Add external jar" and navigated to wheel.jar.
I went to "Order and Export" and checked wheel.jar.
I had several errors. In the .java file for each activity (except the main activity), I got an error on the line
import kankan.wheel.R;
I commented this line out.
Also, since wheel.jar apparently doesn't specify a minimum API level, I got a error, but I just put a minimum sdk level of 8 in the manifest. I was then able to build the project without error. Still, the main screen comes up, but the app crashes as before when I press a button for any activity.
Can you see anything I've left out or done wrong?
Try to place your jar file to the 'libs' folder at the project root
I was never able to get it to work with the rar file. Here is what worked;
svn checkout http://android-wheel.googlecode.com/svn/trunk/ android-wheel-read-only
import wheel project into eclipse
fix the android:targetSdkVersion version in the manifest to get rid of the "unable to resolve target android-7" error
build the wheel project as a library
import wheel-demo project into eclipse
fix the skdVersion in the manifest
change "import android.wheel.R" to "import android.wheel.demo.R" in all the source files where it occurs.
build the wheel-demo project
I may have left out a minor detail or two.

APK path is not specified for module "Example-Example"

I am newbie in the world of android app development. I was creating a project Example on Android Studio. I have my LunchList.java file in src/main/java/apt.tutorial.lunchlist .Till yesterday Everything was working fine. But when I open android Studio today I got an error saying
"The modules below have been removed from Gradle structure. Check
those to be removed from the project too:"
☑ LunchList
☑ LunchList-LunchList
And there is OK and Cancel Button. I don't want to remove them. So I click cancel and proceed.
Then when I tried to run the application in emulator the emulator runs but nothing happens. And I got this error
Waiting for device.
Target device: emulator-5554 (Android)
ERROR: APK path is not specified for module "LunchList-LunchList"
I don't know what went wrong. Please help me.
[Edit: I tried unchecking both of them and click OK. But after that I'm not getting the first error but still getting the second error ]
Exit Android studio. Launch it with Administrator Privilege.
This solved the problem with Android Studio v0.1 in Windows 7.
I had the same issue, I unselected the 2 files and then received the error
"ERROR: APK path is not specified for module"
I just restarted Android Studio and reopened the project and then it worked normal again.
It is indeed a bug but there's a simple work around.
Here's what worked for me: delete .idea/ and *.iml files, then open a project again (as gradle project) - all the idea files will be recreated - and everything works fine
I had the same error with IntelliJ CE.
I fixed it by choosing "Inherit project compile output path" in the strong text imodule settings (Paths tab > Compiler output)
In my case, I imported the same project over again. Android Studio overrode the old settings. Then this error went away!
this happened when i update to 2.0. i had to change the dependencies in the build.gradle file under src dir not gradle dir. change from
dependencies {
classpath 'com.android.tools.build:gradle:0.4.0'
}
to
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
Not sure how much help this will be, but I saw that same error this morning after updating to Android Studio 0.2.0. First, I needed to modifying my build.gradle file to indicate that the correct gradle plugin to use with my project was version 0.5.0 (rather than 0.4). After modifying build.gradle, I saw the "APK path is not specified for module .." error when attempting to build. I solved this by simply quitting and restarting Android Studio.
I had the same issue and found the solution.
Stackoverflow Question
this is the same way to fix the error
Also lower down in there is "SDKs" i also had to make them match.
Name and Build Target.
Hope it helps it did me. apparently the IntelliJ is what Android Studio is.
I've found that the issue is usually if you've changed or moved the folder to a different location.
If you open up the .idea folder in AndroidStudio, have a search for any reference to the old location. If you find some, just replace with the new location. It would seem some of the lines are hardcoded.
There is a manual "how to move project" here
I moved progect, got your problem, followed this manual, got window like you and choose "OK".
And now it works very well.
It helped me to set the right SDK...
I used the one in Program Files, what did not work!
Then i found out to use the following SDK (set in local.properties):
sdk.dir=C:/Program Files (x86)/Android/android-studio/sdk
Hope this helps...
I find this:
http://www.chrisdew.com/blog/2013/07/17/android-studio-nosuchmethoderror-lazystringarraylist/
it is realy help for me.
Thus, in my case, the problem was to have two libraries:
protobuf-2.4.1.jar
and new protobuf-2.5.0.jar
it resulted error:
APK path is not specified for module “Example-Example”
To correct this, rename file protobuf-2.4.1.jar to protobuf-2.4.1.jar.disabled
mv protobuf-2.4.1.jar protobuf-2.4.1.jar.disabled
Finally! Updated solution found here:
Android APK path is not specified for module
Open Project structure
Click on Modules tab
Expand your project and click on Android
On right side click on Compiler tab
Looking for "APK path" field
Enter your project root folder, i.e. /Users/bla/project/my.apk
Click Apply and Ok

Android Properties Window

If I right click on my project and select properties. Then select android properties on the left side of the screen I am given a window where I can change project build target or add a library. The problem is none of my changes appear to be "sticking" in this screen when I hit apply or ok.
For example I go into the screen to add a library project:
Then I hit apply, then ok. When I go back into the screen none of my changes have been applied:
This is a problem because I want to reference a library project in my main project. Whenever I try to reference one of the classes in my library project from my main project I get a class not found exception. Also whenever I run my project it says the libray-project.apk is not found in the console window?
Any suggestions or is this possibly a bug in eclipse or the android tools?
This bug has been reported here: http://code.google.com/p/android/issues/detail?id=17673&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars
Check that default.properties file is not read-only. This file is located in root folder of your Android project.
UPDATE: I actually tried making this file read-only and can see exactly the same behavior, but on Ubuntu. Don't have access to Windows machine now. This should probably be reported as bug.

How to resolve build path errors?

If I run my project this error will come build path problem how to solve this error.
error:
Description Resource Path Location
Type Project 'videothumb' is missing
required source folder: 'gen'
videothumb Build path Build Path
Problem
The project cannot be built until
build path errors are resolved
videothumb Unknown Java Problem
Can any one help me?
Try to clean project and if it still doesn't help close and then open project.
IF you are using eclipse then do as follows:
right click your project.
select build path-->configure build path.
update all the broken links in all 4 tabs.
Go to project-->clean [project will be found at top menu of eclipse.]
Clean your project.
Its done. For any further explanation comment on my answer.
Hope this helps.
Edit:
Here you go:
As you can see i'm at source tab of configure build path and i have only one folder here named ATalk/Src. likewise you can have number of folders.
Check for red cross mark on folder. if its there then your folder path is wrong means link is broken for that folder.
Same way you can check in Libraries tab. There you will find list of jars in your project. If any of them have red cross then its path is missing. So update all such red cross paths.
As you can see i dont have a red cross on my folder means it is at correct location.
Hope you get my point.
EDIT:
I just noticed that, according to your screenshot, the problem seems to be that the adb tool is not found. Now I might be wrong but I think that as of Android 2.3 (maybe even earlier) the adb tool is expected to be in [path-to-your-sdk]/platform-tools folder, not in the [path-to-your-sdk]/tools folder. The later path was used in earlier SDK's and your problem might be caused by such a simple thing that you have an outdated Android plugin in Eclipse.
OLD, IRRELEVANT ANSWER:
I've seen these kind of issues in Eclipse environments when I have some kind of error in my XML files. Malformed errors (that violate the rules of the XML structure) are often treated as "syntax errors" and are shown directly when you write them or when you try to build your application.
Other errors, however, like giving invalid references (giving a dimension where an integer is expected, for example) are not always highlighted with file name and failing line number (I'm not sure if this is bug in Eclipse's android plugin or even if it's a bug at all).
These kind of errors you'll have to hunt down manually and rebuild your project (as dcave555 sugested). This is really boring work if you have many XML files with many changes in
I think the path should look like this: /home/embdes/projects/android/android-sdk-linux_86
The problem is because of your Android build path settings. Try to check:
Window > Prefereces > Android > Build path
it should properly set to your Android SDK

Categories

Resources