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
Related
I'm attempting to create an Android app with Android Studio that uses source code from:
https://github.com/mapbox/mapbox-gl-native/
I will need to modify the source code, build and debug the changes, and commit those changes back to the forked repository I've made from mapbox-gl-native.
It appears much of the library code is in C++, while the project that uses the code will be in Java (if that makes a difference).
I've tried a bunch of things (mostly ignorant) and keep getting the following message:
Gradle 'name' project refresh failed
Error: Configuration with name 'default' not found.
Newbie on Android Studio, so please be as descriptive as possible. I'm using Android Studio 1.4.1, as other similar questions seem to have version specific answers.
Is there a description on how to set up an Android Studio project to include source code and how to structure such a project?
or
Can you tell me what the message means and how to fix it?
Thanks.
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…
I copy appcompat folder from Android SDK extras v7 folder and create a Android library module in my project. Compiling project I get errors, first one being appcompat/res/layout/abc_action_mode_close_item.xml:17: error: Error: No resource found that matches the given name (at 'contentDescription' with value '#string/abc_action_mode_done'). Looks like appcompat needs mediarouter resources as well. So I create a Android library module mediarouter. I set mediarouter as a dependency for appcompat library. Compile. Now I get the error mediarouter/res/values/styles.xml:18: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.ActionButton'. I add depenency appcompat to mediarouter. Compile. Now I get the errors
appcompat/res/values/attrs.xml:32: error: Attribute "windowActionBar" has already been defined
Help!
You just need to add "#string/abc_action_mode_done" in your appcompat/res/values/strings.Do not "set mediarouter as a dependency for appcompat library".(In my case,"#string/abc_action_mode_done" already exists in the appcompat/res/values/strings.I don't know why you miss it.)
"add depenency appcompat to mediarouter" is necessary.
I stumbled across this problem and it seems to be a bug in IDEA:
when you create the library module, IDEA will create some boilerplate files in the new module. During this operation, IDEA will overwrite the strings.xml resource file with some kind of template strings.xml-file intended for newly created android applications (IDEA will also create other stuff you don't want or need).
There are two workarounds:
1. Create the library module in IDEA first and copy the appcompat-resources afterwards into the existing library module directory
2. Just make the sub folders readonly before you create the library module in IDEA. This will prevent IDEA from changing the files in the library.
After that, the library module compiled on my machine.
I am using InteliJ Idea Community edition to develop android apps. I was trying to write UnitTests for a HelloWorld App as described in link text
. However I keep on getting an error
Found main project package: com.example.helloandroid
Found main project activity: .HelloAndroid
Error: Unable to load the main project's default.properties
On going through the files that were created by InteliJ Idea, I saw that all the files as mentioned in d.android.com/guide/developing/other-ide.html#CreatingAProject are being created except for defaul.properties and build.properties.
Is there any way we can create these files?
I had the same problem you're describing as I'm also developing using IntelliJ and these are the steps I followed to create a valid default.properties
1) Create a project using Android (with no IDE) the instructions are here. I created using exactly the same information than in my original IntelliJ project but looking at the resulting file it was not that important.
2) Copy the default.properties to your own project
In order to create the project you will have to know the id of the target you are using, you can obtain the list by executing android list targets.
Once I created the project I opened the default.properties file and the only thing important there was the target, in my case Project target.target=android-8
Hope this helps although your question is stackoverflow since a long time already.
Regards
PS: if I knew how to attach a file you wouldn't require to follow the above steps as the resulting file has no project specific information except for the target (if you want me to send it to you just tell me)
This is a bug and has been fixed but the fix has not been released yet:
http://youtrack.jetbrains.net/issue/IDEA-69343?projectKey=IDEA&query=android+default.properties
I followed the instructions here on how to create an Android library project, and use it in an Android application:
http://developer.android.com/guide/developing/eclipse-adt.html
but it is not working. I can see the library project is added to my application but I cannot reference anything in it because it won't build. The R.java file from the lib is NOT being added to my application project, so the lib project contains tons of errors, everywhere it tries to reference it's own R.java file.
I don't know if this has anything to do with it, but in the console there are messages stating that the there is "No resource identifier found for attribute 'X' in package 'Lib Package'. My library package has a a few styleable attributes defined for a custom view I made, all of which are being complained about in this console message. The library builds just fine, and I don't get those messages in the console until I hook the library to my application, so I don't know what's up with this.
I really would like to get this working. I've spent two entire days on it, to no avail. Please offer any ideas you might have to help!
The answer to my conundrum was that the library had an attrs.xml file that defined a few custom attributes for a custom view I created. I removed attrs.xml and hardcoded the values in the custom view code, rebuilt the library, and problem solved.
This isn't cool though, what this means is that custom views with custom attributes can't be used in libraries. I hope Google fixes this.
It's actually a matter of file duplicity. You can't build a project that contains more than one instance of the same file. Due to the nature of an android project XML files are usually the first the negate a successful build.