I'm trying to install and test the andgram application available at https://github.com/markchang/android-instagram.git
But, some layout files show the following message and Eclipse doesn't generate the R.java file:
NOTE: This project contains resource errors, so aapt did not succeed, which can cause rendering failures. Fix resource problems first.
Couldn't resolve resource #style/ActionBar
I thought it was the SDK version, but I have the version 8 installed and it doesn't solve the problem.
I would appreciate any help.
Thanks!
The library you are trying use depends on the android-actionbar library. Have you downloaded that library and added it as a library project to your project?
Edit:
FYI, The actionbar library it depends on is outdated (2+ years).
You have change your build target to at least API 11 in order to support the ActionBar.
Related
for certain compatibility reasons, I have to use Eclipse Neon for Android Development to develop an android app. Therefore I also have to use the newest Android SDK so I can implement some newest features.
Now, I am facing the problem that I cannot compile any Android app with Eclipse, because I get errors like
The import android.support cannot be resolved
ActionBarActivity cannot be resolved to a type
Error retrieving parent for item: No resource found that matches the given name "ThemeAppCompat. …"
upon building. As I found out, this is because Eclipse is missing the "Android support library" (android support library.jar ?) in the sdk folder. The reason for this is, as I found out, that this library is obsolete and has been replaced by the "Android support repository". It has not been installed by the Android SDK manager and cannot be installed anymore, but Eclipse still needs it apparently.
I searched a lot for a solution for this but all answers I could find was "Swtich to Android Studio"… Unfortunately, there is no way around using Eclipse for me. Is there any known way to include the support repository and make eclipse use it? I found this site
https://developer.android.com/topic/libraries/support-library/setup.html
and thought, maybe I can follow these steps to make my app to a gradle.build and then include the stuff from the repository and get my stuff to work, but unfortunately I could not find a way to realize this.
I changed the related section in the gradle.build file to this:
…
dependencies {
…
compile 'com.android.support:appcompat-v7:24.0.0'
}
…
but could not get the app being built.
Is there any known solution for this? I actually cannot imagine that I am the only one trying to develop an Android App with the new support repository file these days. Should I maybe manually insert the obsolete (but newest) android support library.jar file from an older IDE? Could this work?
Thank you many times for your help.
Help needed!!!! Stuck for 2 weeks on this and help needed.
I've recently imported the facebook sdk for android and its projects into my workspace. It shows up errors and the problems:
Archive for required library: '/home/Documents/facebook-android-sdk-3.0.2.b/facebook/libs/._android-support-v4.jar' in project 'FacebookSDK' cannot be read or is not a valid ZIP file
And the samples get errors along the line of:
The container 'Android Dependencies' references non existing library '/home/Documents/facebook-android-sdk-3.0.2.b/facebook/bin/facebooksdk.jar'
The things I have done following the other discussions without any success are
cleaned project
set the Facebook SDK as library
looked at the build path section and added external jar consisting of facebook/libs
imported fb sdk like 20 times and into different folders.
made sure my java compiler was 1.6
HELP would be very greatly appreciated!!!!
Take the lastest version of android-support-v4.jar (in your sdk environement : sdk/extras/android/support/v4/android-support-v4.jar) and replace in your project and library project do not create conflict.
The steps to importing a library are:
Download the library
Place the library in the libs folder of the project.
Build the project
Do Not attempt to import the library using some import wizard.
I suspect either your download was corrupted, and you need to do it again, or you put the file into the wrong directly.
I think your problem is that the android.support.v4 versions are different, take the one from your project and replace the one in the Facebook sdk lib folder, it should dismiss the clash.
As per your question, I think you are not able to compile once you add the SDK to your project. Do you get an error saying unable to run as library?
If so that means you have included this as library and create your project as a library to be used further. It is a common mistake that I have seen many people do when they try to import a library to use and tick mark the checkbox is Library. This actually means you want this project to be treated as a library for future use. Just try to add the SDK and do not tick mark the checkbox and this project will run fine.
Many forums will just tell you to tick that checkbox and you will be stuck on this error for long time.
For any .jar file related issues you have to make the .jars files compatible as there hashing a problem and the two jars are not compatible with each other (a version issue).
Does anyone know where the android compat libary is
located in xmlvm so I could copy it by myself to the project folder because this is
what I guess is missing, also would be provided by target=android-on-iphone but as mentioned below this target isn't available in the current build.
I had absolutely no problem installing xmlvm and getting in touch with the
demo/samples also all the demos worked perfectly for me.
But now im stuck at the last 4 errors in xcode, i migrated my android project via --
skeleton=android:migrate then cross-compiled it via --target=iphone and opened
up the project in Xcode. after few project setup changes the errors went down from
72 to 4 errors ;)
however the errors are importing file not found errors of compat libs, so this
should somehow get to be solved i think...
is it because --target=android-on-iphone wasnt used by me because this option
will copy the android compat libary to the project folder.. well i tried to use this
target mentioned in 2 documentations of xmlvm but in the actual build of xmlvm
this target however does not exist..
How to solve these errors?
Screenshots:
http://img526.imageshack.us/img526/8957/bildschirmfoto20120620u.png
http://imageshack.us/f/138/bildschirmfoto20120620u.png/
From what I can see, it looks like you are using part of the Android API which is not yet implemented.
Unfortunately it seems that you either need to rewrite your application or implement the API yourself.
So, I coded my entire app in Android 4.0.3. I used AmbilWarna color picker. Then I got this requirement to reduce the SDK requirement for Android 2.3. This is the point when EVERYTHING was working fine and superb
I have downgraded teh minimum SDK requirement. Everything runs fine except as soon as I include Ambil Warna as a library on my project, I start getting the error everywhere R is used, Saying that R cannot be resolved to a variable.
Upon a loot on the Console, this is what seems to be the real cause of the problem:
AmbilWarna\res\layout\ambilwarna_dialog.xml:18: error: No resource identifier found for attribute 'layerType' in package 'android'
I have set the Android SDK to 3.2 for AmbilWarna library project and on my project its at 2.3
Does anyone have any idea?
this is regarding this: http://developer.android.com/reference/android/view/View.html#attr_android:layerType
you are just trying to use a property for android that is not available on that api of the layout parser.
I just checked out the colorpicker code you are trying to use, and it's project.properties says it's written for target API-17 (android 4.2) and i'm tryng to compile it for API-10 (android 2.3.3)
simply remove those parts.
my diff
--- a/AmbilWarna/res/layout/ambilwarna_dialog.xml
+++ b/AmbilWarna/res/layout/ambilwarna_dialog.xml
## -19,7 +19,7 ##
android:id="#+id/ambilwarna_viewSatBri"
android:layout_width="#dimen/ambilwarna_hsvWidth"
android:layout_height="#dimen/ambilwarna_hsvHeight"
- android:layerType="software" />
+ />
and hope it's not mentioned in the code :)
I've had a lot of troubles too with my external libraries. What usually helped are one of these or multiple steps of these connected:
Delete ALL R.java imports in your Classes (there must not be any of them)
In Eclipse: Source => "Clean Up"
In Eclipse: Project => "Clean..." (This will rebuild your project from scratch and therefore regenerate your R.java)
Manually delete all R.java and save (located in /gen/)
Delete your external library project and readd it.
Step 3 usually did the job for me.
Also be aware that your minSdkVersion and targetSdkVersion fit to your library project (and the guidelines which are included)
I had the same problem, I thought I could just build and include the third party jar file and bring this over to my project - this resulted in the same problem as you - AmbilWarna\res\layout\ambilwarna_dialog.xml error: No resource identifier found for attribute 'layerType'.
To fix it I copied over the source files and all resources into my project (images/layouts etc etc), hey presto it worked.
Thanks http://code.google.com/p/android-color-picker/ for a nice clean easy to use colour picker!!
I have been trying to get ActionBarSherlock ( http://www.actionbarsherlock.com ) working with my eclipse projects. I added ABS into a new project with target version 3.2, and this created fine. When I try to add this as a library to my other project (min version 2.1, target 3.2), I get errors such as
G:\EclipseWorkspace\Android\ActionBarSherlock2\res\values-v11\abs__styles.xml:65: error: Error: No resource found that matches the given name: attr 'android:windowActionModeOverlay'
basically, none of the xml attributes found in 3.0 or higher are recognised. As a consequence, R.java does not generate.
Am I doing anything wrong?
You need to compile with Android 3.2 in addition to targeting at least API 11 both in your app and for the library.
In eclipse, right click on the project and go to "Properties". Under the "Android" tab you'll need to select Android 3.2.
Eclipse is giving me strange Errors too, when implementing external libraries. What always helped for me after some tries:
try multiple times:
*rightclick on your project => Source => Clean Up
*delete and readd the library project
*restart eclipse several
you might also try to delete the generated files to force it to regenerate, but do this on your own risk :)
have fun w/ the open source libraries :)
Try upgrading the version of the sdk and target version 2.1:
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="15"/>
This will allow using last sdk features and the app will work on version 2.1.
Maybe, you'll see issues even after fixing this. Then you can clean the project.