Hello I know this is a really simple question to ask but out of my curiosity, by the way I am just starting learning android programming today, I am wondering why is that in my newly created android application project there are no auto generated activity_main.xml on my
res->layout folder and in the src folder it is empty unlike in this tutorial that I followed there are auto generated files afterwards creating the android application. Provided is the screenshot of my project:
I had the same problem yesterday after updating the latest packages on the Android SDK Manager. Fixed it by updating the Eclipse plugin: Eclipse --> Help --> Install new software --> Pasted URL http://dl-ssl.google.com/android/eclipse/ pressed Enter. After updating the plugin. I created a test project and the Main activity and menu was created by default as normal.
Having the same problem. No autogenerated xml file on layout folder and src.
Deleted ADK and created afresh from Zip Bundle file adt-bundle-windows-x86_64-20131030.zip
opened Eclipse and it was working - XML and src content looked good.
closed Eclipse and opened sdk manager (using "run as administrator") and did upgrades to default packages.
opened Eclipse, created new Android Application - No autogenerated xml file on layout folder and src.
admittedly I only added the paths for SDK;SDK\tools;sdk\project-tools;sdk\build-tools at this stage to the paths file.
I guess I'll delete again and try this now and download updates again.
Related
hi i am android developer and i am getting some problem , usually i do not care about .iml file in project folder but my senior said me that i do not have .iml file in my project . i do not know what the usage of .iml file and how to use it .
but the main thing is that android studio is not generating .iml file for my any project . for example in other developers project , if project name is apple than there would be apple.iml in project folder but it is not happening in my case . i have also updated my Android Studio in hope that it would get fix but it didn't .
well , please help me how to fix this problem and also tell me what is the usage of .iml file in android projects
IML is a module file created by IntelliJ IDEA, an IDE used to develop Java applications. It stores information about a development module, which may be a Java, Plugin, Android, or Maven component; saves the module paths, dependencies, and other settings.
In case if an .iml file is not generated on your project, there
are two ways to do that,
First:
Go to Android Studio and open your project.
Go to Files
Select Sync Project with Gradle Files
Second:
Close your Android Studio
Go to your root project directory
Delete the .idea folder. If not visible you can check the hidden folders
Import the same project again.
This should re-generate your .iml files
To generate a new .iml file
You have to delete all the folder starting with the dot(.) like .idea, .dart_tool and pubspec.lock file
The project folder name should be all lowercase, with underscores to separate words, just_like_this.
Open your project in the Android Studio from terminal run this command flutter create --platforms=android .
This will generate just_like_this.iml file for you. If your package name is different then delete a new directory generated in your project file if needed.
I have just transitioned into Visual Studio Code from Eclipse for Java. I want to create a simple HelloWorld folder which has src and bin folders. However, I do not know how to create the .classpath, .project, and .settings the same way Eclipse does it. How do I do this?
Hit Ctrl+Shift+P to show all commands, then type "Java" and select "Java: Create Java Project"
Visual Studio Code doesn´t have this orientation of creating a project because it´s file oriented. It´s on of the diferences with Visual Studio.
It means that creating a project structure is based on folders and files, and no file references and links the folders and files to a project.
If you want to create a project with src and bin folders, you´ve to do it manually.
I wanted to test the .java Plugin class which will help in the exposure of the methods that are available in the integrated .aar SDK. I have created the cordova project and integrated the .aar SDK file. I added the plugin class to src directory. I referred to http://moduscreate.com/plugin-authoring-cordova-6-ios-android/ for the changes that has to be done in the .js and .html files. I added the feature in config.xml (app's res directory). But everytime I run the command cordova build android the config.xml file gets reset. But If I run the app using Android studio it works fine. Why is it so?
If you build through Command line, every time it will replace your platform config.xml file with config.xml file(exist in your project folder). If you want to build an app with your custom plugin then you should add a plugin through cli(it wont accept manual installation).
Please follow this link for more details.
Edit
Just saw the other answer and it is not much different from mine. Should have checked before I answered.
Original
The config.xml in platform folders get replaced with the config.xml in the projects root folder everytime you build. Either change this one or add plugins through the command line and Cordova will edit it for you.
I am new to Android development and I have downloaded Source code of Cameraapp from Google web site from following locaiton:
https://android.googlesource.com/platform/packages/apps/Camera
I am trying to build and compile it into the Eclipse ADT environment. However when I open the folder using File> Import> Android> select existing project, I do not see the folder being able to be selected as a project.
I also noticed that there is no Android Manifest file inside this folder. How is this possible?
I read somewhere that camera app does not have its own Android Manifest file but it uses manifest file from the Gallery App. Which may be right. But my question is that how can I even compile this application?
Or would I have to compile the entire android application folder? Hopefully that is not the case.
If you do not have manifest file in the project then you have no option than to create an empty android project and copy the corresponding res/ and src/ file to your empty project.
Then modify your manifest file to define your activities and permissions. Then you can build and run your project in your ADT workspace.
I recently had to prepare a BB app for submission to the BB app world, but I have an issue when running the app. Basically, I've created a new Blackberry project, using the "use existing source" option to point to the sources I've got from the developer that actually developed this app. Building the application just works, but when I want to start the app it immediately quits with a NullPointerException.
When debugging the application, the debugger halts at the following line:
Bitmap bitmaplogo = EncodedImage.getEncodedImageResource("img/logo.png").getBitmap();
With the following error:
[0.0] FRIDG: could not find img/logo.png
I do have an img/logo.png, which is located in /res/img/logo.png. Attempts of specifying the path as "res/img/logo.png", "/res/img/logo.png", "logo.png" have not worked. I personally don't think that's the issue here, this exact code base works perfectly for another developer. I'm more inclined to start looking into tooling, JDK/JRE versions, project settings. Maybe resource files should be explicitly included in the build?
Some other information:
My Blackberry project uses Blackberry JRE 5.0.0 as the JRE system library
I have Oracle Java SDK 6 Update 26 installed
Using Blackberry Java Plugin for Eclipse 1.3.0
On Windows XP SP2
Has anyone encountered the same issue before?
Filenames and extensions are case sensitive. logo.png and logo.PNG are different files from application's point of view. So, be careful with naming files and folders.
The root folder for images you get in your application is the root folder of your source files package.
For instance, if you have the following folder structure:
YourProject
src\
com\
company\
etc\
img\
Then the root folder for your images will be: YourProject\src
Image files located in YourProject\img folder are invisible for your application code, unless img folder is located in YourProject\src and the full path is:
YourProject\src\img
and your image file has the full path like that:
YourProject\src\img\logo.png
In this case you can load the image via specifying it's path: img\logo.png
and without it, just via specifying: logo.png
Specifying the full path is recommended if you have several images with similar filenames.
If you have several files logo.png in your project, and you load it via specifying only file name "logo.png" then the first found image from your project will be loaded.
Resume: transfer your img folder into the src folder.
Not sure if this is the same as your problem, but when I get those types of errors, it usually means that I need to force the project in Eclipse to refresh (right-click on project and choose Refresh) and then rebuild.