I added BlackBerry Nature to Android Project and remove the BlackBerry Nature From Project. After that Android project Manifest shows error and not build the project. I did not do any changes on Manifest and just show error mark.
I closed the eclipse,clean and build the project but still same
How to solve this ?
Did you miss
<?xml version="1.0" encoding="utf-8"?>
at the beginning of your AndroidManifest.xml ?
After several hours I found a solution actually I don't know what happen but it worked.I change the java compiler version to 1.5 and build the project, again I changed the compiler to 1.6 and build the project Then and only it fixed. ;)
You may need to prevent Blackberry plug-in from involving in making procedure.
Here are the steps:
open menu "Windows" -> "Preferences" -> "BlackBerry" -> "BlackBerry Plug-in for Android Development Tools"
under the title of "Verifier options" , un-check "Enable APK verifier ( checks ....) "
confirm the change by clicking on "Apply" button or "OK" button.
open menu "Windows" -> "Preferences" -> "BlackBerry"
under the title of "BlackBerry Reference" , check "Clean distribution folder("dist") when BlackBerry nature is removed"
it would be better to delete the BlackBerry Targets.
Related
What needs to be done to add a new activity to existing project that works and compiles but has "Project not ready" in the menu. Please see the picture.
Other than that all works, so I don't know what IDE means by "Project not ready"
This is a little bit over a year but i thought i would provide an answer for anyone (novice like me) who may encounter the same problem.
I had the exact same problem as depicted and denoted. It was fixed by
Cleaning the project (Build --> Clean Project)
Sync with Gradle ( Tools --> Android --> Sync project with Gradle files)
What I did to solve this was to open up specifically the Android project in a new Android studio instance (not from the flutter project, which has everything)
Note if you don't see the option to do this in your project -> flutter options
Then you can just open the folder containing the project, followed by opening up the Android project specifically from there.
Now you should get the options
(Not an exact answer) Observation:
I don't know exactly what happened, but it works now, all I could notice is that gradle had some error from unclean build likely I must have had some code changes resulting in invisible compilation errors. After good build menus available again.
Please post your "observation" if you don't know exact answer.
Thanks
If you want to add a Activity to an android application,
you have to Extend Activity from one of your classes like this:
public class SecondActivity extends Activity
And add that activity to your manifest.
<activity
android:name=".ActivitySecondClass"
android:label="#string/app_name2" >
</activity>
You have to give the project time to build first. Wait a minute or two before jumping in.
I had the same issue. I fixed it by clearing the cache. (File > Invalidate caches & Restart).
In any activity of my project, if i do some changes and then save that activity i got the message "Running android lint has encountered a problem."
This is the my error log :
java.lang.NullPointerException
at com.android.ide.eclipse.adt.AdtUtils.workspacePathToFile(AdtUtils.java:466)
at com.android.ide.eclipse.adt.internal.lint.EclipseLintClient.getClassPath(EclipseLintClient.java:753)
at com.android.tools.lint.client.api.LintClient.getJavaClassFolders(LintClient.java:198)
at com.android.tools.lint.detector.api.Project.getJavaClassFolders(Project.java:270)
at com.android.tools.lint.client.api.LintDriver.checkIndividualClassFiles(LintDriver.java:977)
at com.android.tools.lint.client.api.LintDriver.checkClasses(LintDriver.java:920)
at com.android.tools.lint.client.api.LintDriver.runFileDetectors(LintDriver.java:785)
at com.android.tools.lint.client.api.LintDriver.checkProject(LintDriver.java:661)
at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:288)
at com.android.ide.eclipse.adt.internal.lint.LintJob.run(LintJob.java:151)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)\
I don't to know how to solve this.
The following steps helped me to solve the same issue.
On My Project -> Context Menu -> Android Tools -> Fix Project Properties
Changing to latest version in AndroidManifest.xml
android:targetSdkVersion="21"
Maybe just one of them is enough :).
In Window > Preferences > Android > Lint Error Checking; Uncheck "When saving files check for errors".
I hope it will helps you
However, the root cause here is some sort of invalid project definition -- one or more of the class path entries are pointing to a resource which can't be opened; for example, you might have a classpath reference which is relative to a class path variable, and the class path variable is no longer pointing to an absolute location.
The above CL will simply make sure that lint doesn't throw an exception in this scenario, but it won't be able to do actually include the given reference.
You'll want to look at the project properties dialog and make sure all the build paths and resources are correct -- and that's the workaround until this issue is integrated
What worked for me was to open the "appcompat_v7" project on my Package explorer. I had closed it before and forgot to open so I got the same problem as OP. Now it's all fixed
Here is another solution, just tested it.
Go to Project properties -> Java and set compiler change Compiler compliance level: to 1.7.
If this is not working then try Project properties -> Android switch from what ever it is using to android 4.4.2.
In my particular case, the problem was caused by conflicting key bindings.
Check .metadata/.log in your project folder for hints.
Why this Error?
It seems that its something related to appcompat_v7 library that we have in our package Explorer. If you are working with API (targetSdkVersion) level 21 you would not face this issue.
For Mac OS X Operating System :
Go to Menu : Eclipse -> Preferences -> Android -> Lint Error Checking and Un-Check : "When saving files, check for errors"
For Windows Operating System :
Go to Menu : Window -> Preferences -> Android -> Lint Error Checking and Un-Check : "When saving files, check for errors"
You may find this post helpful : http://code2care.org/pages/solution-running-android-lint-has-encountered-a-problem-nullpointerexception-error/
If I change some code, save, and Run, it runs the last version of the program, not what I just saved. The only way I can make it update is if I Clean the project, Build the project, and then Run the project. Is there some way to avoid this tedium?
I spent some time create two dummy projects (one Android and one Java) and have a play with it, and finally come up with a workaround which is not used very often but able to solve your requirements.
First, I will explain your question a bit more (based on my understanding and what I have tried) so that other people can have a more clear understand about what is happened here.
According to the conversation in comments:
could you tell me what you have in following setting: project->properties->Builder ? – Sudar Nimalan
#SudarNimalan: I am not sure this is what you are asking, but: there's text that says "Configure the builders for this project", and under it is a single option, "Java builder", which is selected (checked). – shino
for android project, there should be, "Android Resource Manager", "Android Pre Compiler", "Java Builder", "Android Package Builder" in this order, chould you add those and try? – Sudar Nimalan
#SudarNimalan: I owe you an apology; I do have those four components. My "project" is split into 4 projects - "core", "core-android", "core-desktop", and "core-html". It's a little weird because I set it up with the libGDX project setup UI, and I was looking at the 'core' project when I answered your question. My 'core-android' project has all four (in that order), and it is the one that has the problem in my question. – shino
Scenario:
You have 4 project:
core: a regular java project (common pure java code here)
core-android: an Android application project.
core-desktop: not related to question so ignored.
core-html: not related to question so ignored.
The core-android project has dependency on core project, by adding core to core-android's build path (Properties -> Java Build Path -> Projects -> Add ...) and export list (Properties -> Java Build Path -> Order and Export).
Problem (Not Really):
Change some code in core and save it, run core-android, eclipse install last compiled apk, not the new one with change.
Reason:
The is the expected behavior, the way you used to reference core project in core-android only create a weak link (or something sort of) between core and core-android, the core-andorid's auto-build script doesn't aware any changes made in core. You have to clean the project (only need clean core-android project) so that Eclipse can delete the existing apk (under bin directory) and re-generate the apk (with the latest code changes from core).
See Xav's comments below, Android SDK tools should aware changes from plain Java project under project build path, and it does not behaviour this feature normally at the moment.
Note that if core is an Android Library project, then there is no problem and your core-android project will aware any changes in core project (java code, android resource and etc), if core is only used in core-android, this could also be a workaround: turn Java project core into Android library project.
Workaround (Eclipse Link Source):
There is another way (not commonly used) for adding soft link between projects:
First, you need remove core project from core-android's build path, this will also remove it from Export and Order list.
Right click core-android, choose Build Path -> Link Source ... Add ../core/src as Linked Folder Location and src-lib1 as Folder Name,see screen screen in the end.
This create a symbolic link src-lib1 under core-android in Package Explorer windows point to core's src foder, in the file system, you still have two separate project folder. Now if you change some code in core and run core-android, Eclipse will build and install latest apk. No need to clean core-android project.
Link Source Window:
Final look in Package Explorer:
You should always consider the normal approach as first option, after all, manual clean project is not a big deal compare to the unusual approach I described above.
Please follow this steps..
1. Project--> Build Automatically been checked??
2. Please following setting: project->properties->Builder like that?
Check below image.
And Also Check Below Settings.
Also Check Below Image
IF problem continues then please Update your ADT & SDK.
Hope it works for you .
Navigate to Windows->Preferences->Android->Build. Make sure that the checkbox "Skip packaging and dexing..." is NOT checked.
The Problem is the In your Eclipse, go to Project Properties - Builder, There is one CheckBox with AndroidPackageBuilder that is required to be Checked True. Now everytime you will do any changes in you project that will be reflected in your build and the Compiler will never say that
"Application Already Deployed, No need to Reinstall"
This will work evenif you dont have selected Build Automatically, Because everytime you run by clicking Run icon or Ctrl+F11 that will first Build the Project and Then Run it. So The requirement is just to Enable the Android Package Builder
You won't believe how easy and silly is the solution
On Eclipse,
go to Window-Prefences->run/debug ->launching
And then, on Save required dirty editors before launching :
choose the Prompt option,
Apply and OK
I've installed Eclipse for android and that works okay. When I try to start a java-file I got the following error: Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/ref/FinalReference
After some research I know it was something with buildpass but after trying I didn't got it to work. I removed it all (Eclipse, Java, Android) and reinstall everything but with the same disapointing result. Could somebody explain to me what to do because what I tried from the internet didn't work for me.
Find Running configurations -> java application
In the new configuration's Classpath tab, find "Android Library" under Bootstrap Entries and remove it.
Still in the Classpath tab, select Bootstrap Entries and click the Advanced button.
Choose Add Library and click OK.
Select JRE System Library and click Next.
Select Workspace Default JRE and click Finish.
Based on http://www.frickingnutz.com/files/android_pdf/FAQs.pdf
I have been frustrated by this error for several days, by comparing with my colleagues Eclipse preferences with mine, the problem was fixed by changing the Java compliance level from 1.7 to 1.6.
This will also change the generated .class files and source compatibility to 1.6.
If you tried running a specific java class, then every time you click the run button it will default to whatever you tried to run last.
Click the drop down beside the run button and choose specifically what you want to run.
Go to "run configuirations" under the "run" menu. Select the delete run menu. Do a clean and then you should be back and running again.
I was trying to use all the answers above but it doesn´t work.
This error happened when I wrote 1 method that returned a String [][] ( don't know why yet) but the error doesn't disappear when I disable (/* */) the method.
Finally I did 2 things:
Created a new Android Project and copy the files. rebuild the Activity.java and the manifest.xml.
It worked until I activate the method then the same error all over again:
VM java/lang/NoClassDefFoundError: java/lang/ref/FinalReference
and then
Error occurred during initialization of VM and no matter what I do, it didn´t work until I create another Android Project.
So the 2nd thing I did was :
Run-> Run Configurations->Java Application and click on New_Configuration then I clicked on the red X above (Delete selected launch configuration) and it worked ( not the method but the program worked when I /* */ it.)
All of my Android projects have error sign now, but there is no error in the project. I didn't edit anything but there is an error sign by each project now. The sign appeared first by 3-4 projects only, I didn't edit absolutely any of my projects and the sign appears now by all my projects. What can this be and how could I resolve this - I don't want to rebuild my projects from the beginning, of course :)
I already tried project->clean but I have again the error sign.
If you go to Window -> Show View -> Problems you can see exactly why the errors are there and take action accordingly. Usually, if there is no obvious error, cleaning your project can resolve the issue. However, there is clearly something else going on for you!
Try this
1) Right click on the project (in Project Explorer)
2) You should see Android tools towards the end. Click on it to get a list of options
3) Choose "Fix project properties"
Shash
Have you tried signing your application? Go through these steps and see what happens
http://developer.android.com/guide/publishing/app-signing.html
go to Project>>Clean ..try this..