When creating a new android application i get the following error messages.
Project 'appcompat_v7' is missing required source folder: 'gen' appcompat_v7 Build path Build Path Problem
The container 'Android Dependencies' references non existing library '/Users/Edvin/Documents/Edvins Workspace/appcompat_v7/bin/appcompat_v7.jar' MyFirstAndroidApp. Build path Build Path Problem
Im using Android 5.1.1 (API 22) and I've also installed other SDK packages that were required. When i create the project I compile and target with API 22 and the rest of the setting i leave as default. I've seen somewhat similar questions regarding this but the solutions have unfortunately not worked out for me.
Any help or thoughts is greatly appreciated!
If you can then install Android Studio which is the officially supported IDE for android sdk.
You won't have to download libraries jar and instead use the repositories in the maven servers.
Alternative :::
In project.properties file remove appcompat_v7 reference line. Then remove all the error lines that you get in some files like manifest.xml, values folder files, and may be in some java files.
Since appcompat_v7 is not there then its all references should be deleted.
In activity files extend it to Activity.
Related
The "Android Private Libraries" item is missing from my project (it doesn't appear in the Project Explorer in Eclipse)...
It appears as though it isn't getting built into the project either, as I'm getting various errors regarding jar files in my "libs" folder...
It does appear in Java Build Path (yet it appears to be empty - no jar files appear under it in the Libraries tab), though, and I did make sure it is checked there.
If it is of any relevance, the project at hand has a lot of Android library project dependencies as well, and in those library projects the jar files under libs/ do appear under Android Private Libraries.
I found the problem - I just recently added a new library project as a dependency, and it had an earlier version of android-support-v4.jar in its Android Private Libraries than the one I was using, so that ended up causing the entire Android Private Libraries folder not to be generated in the end project.
Found this out by looking at the Android Console after trying to build.
May be try the following steps
Check and install Android SDK Build-tools in Android SDK Manager.
Package Explorer -> Right click the project -> Android Tools -> Fix Project Properties.
Project -> Clean
Check this Libraries do not get added to APK anymore after upgrade to ADT 22
Please update question with eclipse screen shot to get more clarity on problem you face :)
check console
you can find android-support-v4.jar in two paths
Go to those path manually and replace the android-support-v4.jar with larger size
thats it!!it works for me:-)
this question is duplicated with Libraries do not get added to APK anymore after upgrade to ADT 22
Firstly, you may need to check out our "Problems" view in eclipse for any useful information there. In my issue, it said that two versions of android-support-v4.jar were found in workspace. this error prevented the importation of private libraries. Issue was fixed after I removed one of the jar file.
I removed android-support-v4.jar from java build path in properties and it worked for me.
Remove the oldest jar file from the libs folder and replace it with the same jar file that's being referenced in the other project. If they both have the same version it should work and you should see your Android Private Libraries folder again.
I have a rather big Android App project that is referencing several library projects. Everything was fine until i upgraded the eclipse ADT plugin to the newest version (v22). I also upgraded the SDK of course. I do not see any compile errors in eclipse, but when i run the project on the phone i get a NoClassDefFoundError.
java.lang.NoClassDefFoundError: org.acra.ACRA
....
The arca library is included in one of the referenced library project (in the libs folder) and i can see it in the "Android Private Libraries" in the package explorer, also as i said, no compile errors. The project runs fine on everyone else's computer that did not upgrade ADT.
I have already tried a whole bunch of stuff including but not limited to:
re-install the android SDK
download a fresh ADT bundle
delete all my code an get it again from git
copy the library in question to the app project
comment out the code that uses this library - i just get the same error for the next library
all without any success, so i'm getting really desperate here.
I would be really happy if anyone could give me a hint on how to solve that problem.
Quoting Streets of Boston from his adt-dev post:
When upgrading, the 'Order and Export' of the new 'Android Private
Libraries' is not always checked. And the android-support-v4.jar is now in
this 'Android Private Libraries' section.
To fix this, go to 'Order and Export' and check 'Android Private
Libraries'. Then refresh/clean/rebuild.
After you done this 'fix' for a library project, you may need to just close
and re-open any depending project, because they may not see this 'fix'
immediately.
Give this a shot and with luck it will solve your problem.
Simply checking Android Private Libraries was not enough, I also had to install Android SDK Build-tools in Android SDK Manager.
I had also the same problem and my adt was 22.0.1. And none of the solution above worked. Further when adding a external library project to a working project.I always check the gen folder of working project and if R of external library project is there (along with package name),then only external library project is exported. And on my gen folder no packagename of external library was shown.
So I checked on project.properties file and there wasn't any external library link present android.library.reference.1= present. So I manually added the external library reference there ,even though I had added from project->properties->Java Build Path->Projects->Add. So manually editing the project.properties did all the work for me.
I have encountered a similar problem, spent about 3 hours, but none of the proposed here decisions did not help... Finally I found a source of the problem: my project files & project.properties were read-only. Eclipse is simply silently ignoring any changes in library dependencies when I doing it in the GUI!
I had the same problem. It was because of the eclipse project.
To solve it I created a new project in eclipse, copy my existing project classes and resources into it and then launched eclipse again and added my custom includes.
I had the similar issue and my answer is slightly different from CommonsWare's. Here is my screenshot:
After checking the libs back in my build started to work again.
I had also the same problem,
i) add gson lib as referecend librairies
ii) check it in java Build Path
I have a rather big Android App project that is referencing several library projects. Everything was fine until i upgraded the eclipse ADT plugin to the newest version (v22). I also upgraded the SDK of course. I do not see any compile errors in eclipse, but when i run the project on the phone i get a NoClassDefFoundError.
java.lang.NoClassDefFoundError: org.acra.ACRA
....
The arca library is included in one of the referenced library project (in the libs folder) and i can see it in the "Android Private Libraries" in the package explorer, also as i said, no compile errors. The project runs fine on everyone else's computer that did not upgrade ADT.
I have already tried a whole bunch of stuff including but not limited to:
re-install the android SDK
download a fresh ADT bundle
delete all my code an get it again from git
copy the library in question to the app project
comment out the code that uses this library - i just get the same error for the next library
all without any success, so i'm getting really desperate here.
I would be really happy if anyone could give me a hint on how to solve that problem.
Quoting Streets of Boston from his adt-dev post:
When upgrading, the 'Order and Export' of the new 'Android Private
Libraries' is not always checked. And the android-support-v4.jar is now in
this 'Android Private Libraries' section.
To fix this, go to 'Order and Export' and check 'Android Private
Libraries'. Then refresh/clean/rebuild.
After you done this 'fix' for a library project, you may need to just close
and re-open any depending project, because they may not see this 'fix'
immediately.
Give this a shot and with luck it will solve your problem.
Simply checking Android Private Libraries was not enough, I also had to install Android SDK Build-tools in Android SDK Manager.
I had also the same problem and my adt was 22.0.1. And none of the solution above worked. Further when adding a external library project to a working project.I always check the gen folder of working project and if R of external library project is there (along with package name),then only external library project is exported. And on my gen folder no packagename of external library was shown.
So I checked on project.properties file and there wasn't any external library link present android.library.reference.1= present. So I manually added the external library reference there ,even though I had added from project->properties->Java Build Path->Projects->Add. So manually editing the project.properties did all the work for me.
I have encountered a similar problem, spent about 3 hours, but none of the proposed here decisions did not help... Finally I found a source of the problem: my project files & project.properties were read-only. Eclipse is simply silently ignoring any changes in library dependencies when I doing it in the GUI!
I had the same problem. It was because of the eclipse project.
To solve it I created a new project in eclipse, copy my existing project classes and resources into it and then launched eclipse again and added my custom includes.
I had the similar issue and my answer is slightly different from CommonsWare's. Here is my screenshot:
After checking the libs back in my build started to work again.
I had also the same problem,
i) add gson lib as referecend librairies
ii) check it in java Build Path
I have a rather big Android App project that is referencing several library projects. Everything was fine until i upgraded the eclipse ADT plugin to the newest version (v22). I also upgraded the SDK of course. I do not see any compile errors in eclipse, but when i run the project on the phone i get a NoClassDefFoundError.
java.lang.NoClassDefFoundError: org.acra.ACRA
....
The arca library is included in one of the referenced library project (in the libs folder) and i can see it in the "Android Private Libraries" in the package explorer, also as i said, no compile errors. The project runs fine on everyone else's computer that did not upgrade ADT.
I have already tried a whole bunch of stuff including but not limited to:
re-install the android SDK
download a fresh ADT bundle
delete all my code an get it again from git
copy the library in question to the app project
comment out the code that uses this library - i just get the same error for the next library
all without any success, so i'm getting really desperate here.
I would be really happy if anyone could give me a hint on how to solve that problem.
Quoting Streets of Boston from his adt-dev post:
When upgrading, the 'Order and Export' of the new 'Android Private
Libraries' is not always checked. And the android-support-v4.jar is now in
this 'Android Private Libraries' section.
To fix this, go to 'Order and Export' and check 'Android Private
Libraries'. Then refresh/clean/rebuild.
After you done this 'fix' for a library project, you may need to just close
and re-open any depending project, because they may not see this 'fix'
immediately.
Give this a shot and with luck it will solve your problem.
Simply checking Android Private Libraries was not enough, I also had to install Android SDK Build-tools in Android SDK Manager.
I had also the same problem and my adt was 22.0.1. And none of the solution above worked. Further when adding a external library project to a working project.I always check the gen folder of working project and if R of external library project is there (along with package name),then only external library project is exported. And on my gen folder no packagename of external library was shown.
So I checked on project.properties file and there wasn't any external library link present android.library.reference.1= present. So I manually added the external library reference there ,even though I had added from project->properties->Java Build Path->Projects->Add. So manually editing the project.properties did all the work for me.
I have encountered a similar problem, spent about 3 hours, but none of the proposed here decisions did not help... Finally I found a source of the problem: my project files & project.properties were read-only. Eclipse is simply silently ignoring any changes in library dependencies when I doing it in the GUI!
I had the same problem. It was because of the eclipse project.
To solve it I created a new project in eclipse, copy my existing project classes and resources into it and then launched eclipse again and added my custom includes.
I had the similar issue and my answer is slightly different from CommonsWare's. Here is my screenshot:
After checking the libs back in my build started to work again.
I had also the same problem,
i) add gson lib as referecend librairies
ii) check it in java Build Path
I have a rather big Android App project that is referencing several library projects. Everything was fine until i upgraded the eclipse ADT plugin to the newest version (v22). I also upgraded the SDK of course. I do not see any compile errors in eclipse, but when i run the project on the phone i get a NoClassDefFoundError.
java.lang.NoClassDefFoundError: org.acra.ACRA
....
The arca library is included in one of the referenced library project (in the libs folder) and i can see it in the "Android Private Libraries" in the package explorer, also as i said, no compile errors. The project runs fine on everyone else's computer that did not upgrade ADT.
I have already tried a whole bunch of stuff including but not limited to:
re-install the android SDK
download a fresh ADT bundle
delete all my code an get it again from git
copy the library in question to the app project
comment out the code that uses this library - i just get the same error for the next library
all without any success, so i'm getting really desperate here.
I would be really happy if anyone could give me a hint on how to solve that problem.
Quoting Streets of Boston from his adt-dev post:
When upgrading, the 'Order and Export' of the new 'Android Private
Libraries' is not always checked. And the android-support-v4.jar is now in
this 'Android Private Libraries' section.
To fix this, go to 'Order and Export' and check 'Android Private
Libraries'. Then refresh/clean/rebuild.
After you done this 'fix' for a library project, you may need to just close
and re-open any depending project, because they may not see this 'fix'
immediately.
Give this a shot and with luck it will solve your problem.
Simply checking Android Private Libraries was not enough, I also had to install Android SDK Build-tools in Android SDK Manager.
I had also the same problem and my adt was 22.0.1. And none of the solution above worked. Further when adding a external library project to a working project.I always check the gen folder of working project and if R of external library project is there (along with package name),then only external library project is exported. And on my gen folder no packagename of external library was shown.
So I checked on project.properties file and there wasn't any external library link present android.library.reference.1= present. So I manually added the external library reference there ,even though I had added from project->properties->Java Build Path->Projects->Add. So manually editing the project.properties did all the work for me.
I have encountered a similar problem, spent about 3 hours, but none of the proposed here decisions did not help... Finally I found a source of the problem: my project files & project.properties were read-only. Eclipse is simply silently ignoring any changes in library dependencies when I doing it in the GUI!
I had the same problem. It was because of the eclipse project.
To solve it I created a new project in eclipse, copy my existing project classes and resources into it and then launched eclipse again and added my custom includes.
I had the similar issue and my answer is slightly different from CommonsWare's. Here is my screenshot:
After checking the libs back in my build started to work again.
I had also the same problem,
i) add gson lib as referecend librairies
ii) check it in java Build Path