Everything starts out fine with setting up the workspace and project, but I can'at run as an application because there are errors I can't clear. I have tried building java paths and downloading sdk tools and libraries.
and then these errors occur... I did try to connect to appcompat v7 jar, but it did not work. I am a beginner to Eclipse it would be nice if anyone can give some detailed answers and solutions please.
The errors are specifically:
error: Error retrieving parent for item: No resource found that matches the given
name 'android:Widget.Material.ActionButton'. styles_base.xml /appcompat_v7/res/values-v21
The container 'Android Dependencies' references non existing library 'C:\Users\Documents\Android Experiments\appcompat_v7\bin\appcompat_v7.jar'
The project cannot be built until build path errors are resolved
You may want to search for similar posts here at oDesk, ie: Hello World Android App, Error: workspace\appcompat_v7\res\values-v21\styles_base.xml No resource found that matches the given name
AFAIK the first issue happens when you install Android-L SDK, it somehow conflicts with Eclipse's new project wizard (the wizard adds those resource files with errors, you can just remove them in res folder)
About the second issue - probably you need to fix path to appcompat_v7.jar file, see the post where it is in project settings. It may fix the first issue as well, I'm not sure
It's time to switch to android studio even though it's beta the build is .8 which should suffice as significant evidence that it's nearing release. The gradle builds with appcompat are seamless automatic it's so much easier than eclipse to use external libraries.
This is all it takes in the build.gradle with android studio.
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21+'
compile "com.android.support:support-v4:21+"
}
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.
My Xamarin Android project doesn't compile anymore, with a couple error messages saying
Error APT0000: Error retrieving parent for item: No resource found that matches the given name 'Widget.Design.TabLayout'
Other errors that were thrown previously were in the same style, but said
No resource found that matches the given name (at 'textColor' with value '#color/md_white_1000')
I am aware that this is a very common Xamarin bug that is normally fixed by cleaning and rebuilding or, in rare cases, by clearing all packages and package caches so that they are downloaded again. However, this did not fix my error. I also completely reinstalled Xamarin and Visual Studio, but the error persists. At this point, i don't really know what to do except completely reformat my Mac.
Are there any trouble shooting steps I missed? Is this a bug that is only present in some version so that I need to downgrade? Please help, as I haven't been able to compile my code now for two days.
The log is saying that the app could not find certain resources, like TabLayout and #color/md_white_1000.
Did you install the NuGet packages related to Android AppCompat libraries? In NuGet Package Manager, search for AppCompat libraries. For example:
https://www.nuget.org/packages/Xamarin.Android.Support.v7.AppCompat
Those are necessary to find AppCompat resources and themes.
I found the answer: Apparently the newest version of the Xamarin AppCompat Package is corrupt. I was able to compile again by manually copying the project from my colleague, who hadn't updated his packages (the packages are in our .gitignore). That solved the problem and also explains why clearing the package caches didn't work: Visual Studio simply re-downloaded the corrupt package.
I am attempting to merge a pre-existing Android project that uses appcompat with a game written using LibGDX. The problem is, I have no clue how to tell Gradle I need appcompat.
I've tried adding appcompat via the usual method (see the section labeled "Adding libraries with resources") and while this works for a regular project, it fails for the LibGDX's Gradle one. Where there is usually a check-mark verifying that a library project was added successfully, this just has a red x.
Screenshots of Properties Pages:
Example Errors due to this problem:
Error retrieving parent for item: No resource found that matches the given name '#style/Theme.AppCompat'.
So my question is, how do I build a LibGDX project with appcompat using Eclipse?
Have you tried adding the dependency into the build.gradle file?
dependencies {
...
compile "com.android.support:appcompat-v7:18.0.+"
}
I have followed the procedure as described here : Setup
I have clicked on the little 'Sync project with Gradle' button. Gradle and Android Studio seem to find everything but then I can't actually use the gms code. If I try to import, I will get autocomplete for com.google.android.gms but no further. I have updated all the packages with Android SDK Manager.
I'm running Android Studio 0.4.2.
My minSdk is set to 9
my build.gradle includes compile 'com.google.android.gms:play-services:4.0.30'
As far as the procedure is concerned I should be ready to code, but it just doesn't work. Any ideas?
[Edit, added info]
I can find the ComGoogleAndroiddGmsPlayServices3265.aar file in my exploded bundles directory. Inside of that file I also find the common directory and inside that I find the GooglePlayServicesUtil.class (which is what's not being found in my app)
I am lost.
[Edit 2]
The problem is not specific to Google Play Services OR Android Studio. I tried adding another library (HoloColorPicker) and had the same results. However, I was able to add the library's resources to my project! I was able to add them in my XML layouts and view them in my application. I was able to interact with them, they worked fine. The problem arose again when I tried to reference them in the code. Exactly like the case with gms, I had code completion when trying to import up to the point of the actual class, and I could not declare the class in the code.
I was able to use the library by cloning it and importing the project.
Also, this is not an Android Studio problem because the same thing happens on the command line with "./gradlew clean build"
This is a current bug in Android Studio: https://code.google.com/p/android/issues/detail?id=64508 to be fixed this week.
The workaround is to close the project, delete the .iml files and .idea project and re-import the project.
Keep Your compile 'com.google.android.gms:play-services:4.0.30' as very first line in build.gradle dependencies like
dependencies {
compile 'com.google.android.gms:play-services:4.0.30'
compile 'com.android.support:support-v4:18.0.+'
compile 'com.android.support:appcompat-v7:+'
}
`
Open File> Project Structure and do the following steps
Select your main module in which you want to add dependency and click on OK.
Now try to import.
I think the most important question is what you want to achieve. Not all code is under this package. Not even sure which one is.
As noted before, this is a bug with Android Studio. It just don't recognize the path for classes and shows you like if there is an error. If you try compiling you'll see that everything just work fine.
A googler recently said it'll be addressed in this week release, so, be patient and lets see whats coming.
The fact that AS is in Preview mode tell us this sort of things are going to happen :)
Android studio is crazy one, I think.
It's removed "Import module" function and you can do "New module" only.
If you are developed on Eclipse, you need export all your projects to Gradle before switch to Androids studio (WTF?)
I prefer "IntelliJ IDEA Community Edition", although It's similar Android studio but it's better than Android studio (at least until now). You just import your project as eclipse format, IntelliJ IDEA will detect dependences libraries automatic (May be you need import jar libraries by hand) and rebuild project. That Done.
I just updated to the latest Android SDK Tools, r12.
Now compiling of my current project fails by
UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException:
already added: Lorg/anddev/andengine/audio/BaseAudioEntity;
<= The library is definitely added only once - so this must be a compiling problem.
It also fails finding some standard android themes:
...\res\values\styles.xml:4: error: Error retrieving parent for item:
No resource found that matches the given name
'#android:style/TextAppearance.Holo.Inverse'.
The paths to the SDK and other included libraries are correct.
Anyone with same issues?
Thank you!
OK I got the compiling issue fixed - this happened because I included an external library (AndEngine) which sources already were existent in the /out folder. After clearing the folder's contents the project compiled correctly.
"UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: already added: Lorg/anddev/andengine/audio/BaseAudioEntity;"
Most probably there are AndEngine and some extension jars build so, that extension include classes of andengine. To resolve this issue -> exclude andengine src during rebuilding extensions (uncheck folder in export window).