Manifest Folder in new android studio project - android

After creating a new application with android studio.
I see a manifest file in MyApplication/app/src/main/AndroidManifest.xml.
I changed the version code and version name in this file and tried to display them dynamically. However they were still displaying 1, and 1.0.
I looked into the hardisk and Saw a folder in the path:
C:...\MyApplication\app\build\intermediates\manifests\debug\AndroidManifest.xml
using an external editor I changed the values in this file However still getting version 1 on my logs.
Where can I find this Manifest folder/file through android studio?

The version code and version name are generally set in your application module's build.gradle file. If there are values there, they override what's in your manifest file.
The file you found in an "intermediates" folder is part of the build process, and if you modify it directly, your changes will quickly be lost when that file is rebuilt.

Related

Files under the build folder are generated and shouldn't be edited

I want to know if there is any way to edit the BuildConfig.java file in Android Studio, as there is an error when I try to change a variable in that file. It says:
Files under the build folder are generated and shouldn't be edited.
Every time I change the variable and build the project, it returns to the old one.
I want to know if there is any way to edit "BuildConfig.java" file in Android Studio
No. That is generated for you on each build.
However, depending on what it is that you are really trying to solve, you may be able to make changes in your module's build.gradle file that affect what goes into BuildConfig.

Overwrite of asset file when upgrading app

I'm stucked on a weird problem.
I have a xml config file in my project to which I added two values. This XML file is stored in .\assets\internal\ which refers to data\data\<Application ID>\files . This file is, as all my other project's files, stated as "Always Replaced" (seen from Project, Deployment).
The thing is when I upgrade a previous version of the app not containing these two new values to the new app, the XML file is not upgraded to the one in the new APK, and leads to bugs in my app.
I've seen some other people with this problem but I get other errors.
Android Asset file not upgraded on app upgrade
I get File not found error by trying to open SharedActivityContext()->getAssets()->open('config.xml'); though the file is stored in .\assets\internal\... (accessed by IOUtils::TPath::GetDocumentsPath() + PathDelim + "config.xml" in my code).
I get all the same errors by storing the file in .\assets\, which stores it in the external storage + I don't find a way to get a path from TPath to this external storage so I have to write the path in my code.
That said, I have no errors when I fresh install my app by deleting the previous version, but I can't do that to all my devices.
How can I upgrade an asset file (EDIT : with c++ Builder) ? Or should I store it in res\raw to get it upgraded at every app upgrade ?

In android how to get which compiled version(compiled with(library file version)) they used in the project from apk file

In android how to get which compiled version((compiled with)(library file version)) They used in the project By using .apk file
I decompiled the apk and check it. But i can,t able know that.
In AndroidManifest.xml They didn't mentioned like "android:minSdkVersion" and "android:targetSdkVersion".That's Why i am asked this question
Thanks In advance
.apk is just a simple archive file. You can open it with WinRar for example and find the AndroidManifest.xml file inside that archive and you should have a line that starts with android:minSdkVersion and android:targetSdkVersion. The former is what's the oldest version of Android that the application supports and the latter is the target devices i.e. the version of SDK that compiled the code.

What is the use of project.properties file in android

When i first created android project , project.properties file has been generated.
It contains the information about target-platform and dependencies.
I deleted that file and tried to run my project , My Project runs without errors.
So,
what is the use of project.properties file.
It has been mentioned in the comment that "This file should be checked in "Version Control Systems". why ?
As per Docs:
project.properties
This file contains project settings, such as the build target. This file is integral to the project, so maintain it in a source revision control system. To edit project properties in Eclipse, right-click the project folder and select Properties.
I contains all the versions details of your application like minimum version,target version details , library details whichever you are adding in your project. Your applications target version etc. If you modify this file directly it will reflect to your overall project.

Project.properties file instead of default.properties file

I stumbled across something I can't figure out myself.
I have an android project with a reference to a library project. Now, the weird thing is that it seems like my default.properties file is no longer needed. Android creates a project.properties file. So my questions is: what is the difference between the two? Isn't a project.properties file standard java and default.properties android specific? What do they do exactly?
I believe you've got an issue where (some of) your project files have become obsolete after an update to a newer Android SDK.
Run this command in your project directory (you'll need to have ${ANDROID_HOME}/tools in your path):
android update project -p .
It will output something similar to (As of SDK 15):
Updated and renamed default.properties to project.properties
Updated local.properties
No project name specified, using Activity name 'MainActivity'. If you wish to change it, edit the first line of build.xml.
Added file ./build.xml
Updated file ./proguard.cfg
My guess is that the Android team decided to become more standardized and to do away with their own deviations from standards.

Categories

Resources