I am using Intellij IDEA, i have a problem why when i copy project folder to another always result like this? have attribute Android: name is not allowed here even if i just copy old project to new project with 100% same as source but different like this. how to fix it?
Related
I have made a simple Android library for my personal use. Now I have to add some common string resources in the library module so that I can access them in the project wherever I use this library instead of creating the same string resources every time in every project I make.
But when I am trying to add a new string resource Android Studio is giving me an error saying:
"msg_example" is translated here but not found in default locale
I am not able to figure this out. Please help.
There is one similar question posted. But that does not resolves my issue. The answer says:
copy auth_strings.xml from values-en-rIN (locale values for INDIA you can use any locale) and paste it in default values folder.
According to the answer above, the person assumes that the developer is having a locale values directory like values-en-rIN and the string resources in it are getting the error. So he is asking to copy those string resources from that locale values directory to the default values directory which ultimately resolves the issue according to him.
But I don't have any other values directory than the default one. You can have a look in the following image:
So creating the string resources in it is giving me the error. My question is very simple and I have not done anything extra / wrong in the project which is giving me the error.
Hope you might have got the issue / difference between these two project scenarios.
Since you don't have any other values folder than the default folder then I think it's not your fault with the error message you're facing, so I guess it's a problem with Android Studio. You can fix it by invalidating the cache of Android Studio and restarting it. You can do this from the main menu:
File -> Invalidate Cache / Restart... -> Invalidate and Restart
Happy Coding!
I'm using VS2015 Xamarin Android.
When I add a new string resource or make a change to an id in one of my layouts the reindexing and generation for Resource.designer.cs does not happen automatically.
Maybe it's because my project is really big? I have no idea.
The only way I have found to manually trigger it, is rename an axml file to add a space to its end and then remove it, this updates the designer file.
Is there a better method to do this?
This might seems silly but seriously I don't even know why it reacts that way. I am using eclipse JUNO, and I just trying out simple program enables me to put an image inside the layout after my real program said it have the error.
The project shows the error icon but when looking all in the subs-project like the class, layout everything, it is crystal clear. You can see it like the picture above.
I have making an android project before I am updating the adt and stuff. Before this, all I do just put any picture(s) I want in any folder drawable. I believe this is the right step and I know I do the same thing in here but it have issue with it. I even search on the basic tutorial how to put the image and it did the same why I did.
Does anyone knows what had happen here?
Android dont allow image names to contain capital letters in drawable folder change the name to contain only small letters
Capital letters , and some symbols are not allowed to be in the name of the png file , update the name of the png file , . make it in smaall letters
As per user inazaruk's answer, Hence the reason for not using special characters inside file names, as they can no be used in Java names.
As for capital letters, I guess that's to avoid one little problem in Windows vs. Linux environment. That's because Linux thinks that Icon.png and icon.png are different files, and Windows thinks that Icon.png and icon.png is the same file. So anyone using Linux can create application that is not compilable on Windows.
So, change your Humanpng with human Also don't use the extension png as picture name.
Just check your Problems tab in Eclipse. You can find it from
Window > Show View > Problems.
There you can find the error description.
I started some android programming and I am trying to do some animation in my activity. but all references are using interpolators and files from res/anim folder which I can't find in my project. Also, when I am using R.anim I am getting an error that it doesn't exist.
Is there any API to download?
Thank you
You need to import the R file. You should see something like below in the import list of your class file.
import <your.app.package>.R
I had the same problem, and none of the solutions above worked.
In the end, I got it to work by referencing it as android.R.anim as explained here.
Had similiar issue, but could access all other R.* locations but not anim.
Problem was with an anim xml file missing:
xmlns:android="http://schemas.android.com/apk/res/android"
Nothing in IDE detected any error. Hope this helps someone else.
No, R file is not some API. It is a file generated by the Android build system from existing resources. If you can't find some particular references to resources, this means these resources don't exist. You should put them where they belong. Read more about providing resources for your applications.
No api. Your config is wrong in some way. Attach some code, possibly a screenshot of your project browser so we can see the folder/file structure.
In my case there was yet another reason why my R.anim.shake hadn't been recognized. It was because my project is divided into 2 modules (app and library). I placed the animation file (shake.xml) in the app module while I was trying to reference it from the library module. Moving the shake.xml file to library/src/main/res/anim solved the problem.
I'm sure you can help such a newbie like I am.
I created a project in android and I want to use it as a model for next 10 and more apps, just changing the raw sources.
I mean I want to make some products i.e. 10 videocharts about norway, I make one project with the needed activity and resources so each app will differ only for the content value.
I will keep of course the same file name too if needed.
How can I save the project?
Cause I tried to make a new project from resource but I get an error on top of the tab saying Manifest is not present in the folder while manifest is actually there, and I cannot proceed further.
Thank you
ANgelo
This sounds like a place to use an Android library project.