2 Adobe Native Extentions conflict in Android project - android

I have to use 2 ANEs in my android project.
When I attach 2nd ANE Flash Builder shows a lot of such problems:
Error occurred while packaging the application:
aapt tool failed:C:\Users\***\res\layout\anesample.xml:8: error: Error: No resource found that matches the given name (at 'text' with value '#string/cnn').
All of them are with #string problem.
All strings are present and in the res\values\strings.xml.
Both ANEs work well in another project but I could not find a difference between this projects.
What's wrong?

ANEs work fine together fhen I recompiled one of them with different name of strings.xml, i.e. srings-fb.xml.
But you can imagine situation when every ANE library is compiled not by yourself…

Related

Bdsk sample Make error

I got some errors while trying to Make sample Bdsk file. As a novice to Android Studio I would appreciate very much to let me know how to fix these errors.
I use the sample source code according to this instruction:
To use the solution code, create a new Android Studio project using the name "Bdsk" and Company domain "bluetooth.com". When the project has been created, replace the contents of the folder Bdsk\app\src\main with the contents of the Bluetooth Developer Starter Kit folder "Android\Source\solution" (except for thie readme file).
No resource identifier found for attribute
Those errors are not with Bdsk. You are not compiling the Android Support Design Library.
Check your Gradle file for a dependency android.support.design. If there isn't a line with that, there's the problem
No resource identifier found for attribute 'layout_behavior' in package
You'll want to update the version number accordingly

Android same attribute name in two libs, name collision

I'm using two 3rd party libs, both use the same attribute name in their attrs.xml. The build fails with:
Attribute "tabBackground" has already been defined
Is there a way to work around this collision without modifying the argument name in one of the libs?
Actually no.
I suppose you have a dependency from A project to B.
When you build your main project in Eclipse, the resources will fail to build and an error is printed out in the Android console: "... error: Attribute "icon" has already been defined".
Actually you have two ways :
remove dependency from A project to B
OR change attribute name of some project
Also if you build project with Gradle you can use this article which explains how to merge resources.

Is there any legitimate use for #+android:id?

After I upgraded my android tools to latest version to work on API21, trying to compile my project resulted in the following error:
update_languages_button_preference_layout.xml:2: note: did you mean to use #+id instead of #+android:id?
update_languages_button_preference_layout.xml:2: error: creating resource for external package android: id/layout.
update_languages_button_preference_layout.xml:2: error: Error: No resource found that matches the given name (at 'id' with value '#+android:id/layout').
The problem seems to be the line android:id="#+android:id/layout": replacing #+android:id by #+id was enough to be able to compile and run the project normally.
However, a rapid search through the whole codebase revealed a few other locations in the project where the construction android:id="#+android:id/... is used. These apparently didn't prevent the project from passing all tests, even if I can't assure they are all still in use.
Is there any legitimate use of android:id="#+android:id that would justify leaving those references in our xml files, and not replacing them all by #+id?
Why didn't they raise the same error as the first file did?
No, you should never use #+android:id in your app. The android namespace is reserved for the framework. This has never been safe for an app to use and will now generate a compile error.
For a little background, generating new IDs within the android namespace will put them in the unused space after the existing android namespace IDs. This will work fine until new IDs are added in the framework, at which point your internal ID will overlap with an actual framework ID and cause weird issues.
As for the other instances, those should be generating errors as well. It's possible that there is a bug in AAPT. Regardless, you should remove all instances of #+android from your resources.
Though my comment is very late. I faced same issue today, when updated my eclipse and tools. Changed #+android:id to #+id and it solved my issue.

where does aapt look for resource identifiers

I am trying to build an android application from the command line (the one described at "Minimal" source files to create Android app using Eclipse + ADT ) and aapt is failing with some errors.The errors look like:
AndroidManifest.xml:1: error: No resource identifier found for
attribute 'versionCode' in package 'android'and are repeated once
for each attribute in AndroidManifest.xml.
The command I am running is:aapt package -M AndroidManifest.xml -S res -J genSo I think I am somhow failing to define for aapt where to look for resource identifiers. Is this correct?How do I tell aapt where to look for resource identifiers?I am running Android Asset Packaging Tool, v0.2.
Thanks, Jim.
edit:I should have included a link to the page with the source I copied:http://stackoverflow.com/questions/11888398/minimal-source-files-to-create-android-app-using-eclipse-adt
The Best example I found on Internet so far to create android app is https://geosoft.no/development/android.html also in case if you are using support libraries app theme, it would be difficult to figure out how to create R.java classes, I would suggest you to use this reference answerHow to compile an Android app with aapt2 without using any build tools? by which you will be able to use android.jar's general theme without any dependency on any support library.

Eclipse not recognizing Android supplied drawable?

In my app, I've got a menu which pops up when the user hits the "Menu" physical button. It's going mighty-fine except for the fact that Eclipse isn't recognizing one of the drawables that is built into the Android.jar package. If you look and see, "ic_menu_refresh" is built into the supplied Android.jar when you create an Android Project.
I'm using the following code to use the particular icon:
android:icon="#android:drawable/ic_menu_refresh"
Eclipse gives me an error stating the following:
error: Error: Resource is not public. (at 'icon' with value '#android:drawable/ic_menu_refresh').
menu.xml
/Yeousch/res/layout line 3
Android AAPT Problem
I can clearly see the resource but Eclipse seems to ignore it. Any solutions?
The compile error is informing you the resource you want is not public, not for applications to use.
According to http://developer.android.com/guide/practices/ui_guidelines/icon_design_menu.html#examples9 applications should provide their own copies of these drawable resources.

Categories

Resources