I'm using repo, which is used by Android project, to manage my project.
Is there a tool to create repo manifest file with SHA based on current work directory as the following?
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="git://address.com/" name="origin" review="review.address.com"/>
<default remote="origin" revision="ics-something" sync-j="4"/>
<manifest-server url="http://manifests.address.com:8000"/>
<!-- sniff -->
<project name="platform/frameworks/base" path="frameworks/base"
revision="ecb41a77411358d385e3fde5b4e98a5f3d9cfdd5"/>
<project name="platform/packages/apps/Bluetooth" path="packages/apps/Bluetooth"
revision="621bae79f1a250e443eb83d1f473c533bea493dc"/>
<!-- sniff -->
</manifest>
I mean to create a new manifest file base the current manifest, and the project revision value is the HEAD SHA of projects in current work directory.
Thank you in advance.
The repo manifest command creates manifest files with fixed SHA-1s based on the current workspace.
repo manifest -r -o my-manifest.xml
I am new to GIT. I have a manifest file that contains group of related projects. I installed eGIT eclipse plugin to clone the projects. I am able to clone projects one by one in the manifest file. But I want all the projects in my manifest file to by clone at a single time for a specific branch.
Manifest file
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="ssh://xyz.com:29418/" name="origin" review="xyz.com:8081"/>
<default remote="origin" revision="refs/heads/evo_main" sync-j="4"/>
<project groups="common" name="ACT.git" path="code/ACT"/>
<project groups="common" name="AppEngine.git" path="code/AppEngine"/>
.
.
.
.
</manifest>
I am able to clone a single project with the url
ssh://user#xyz.com:29418/ACT.git
But since there are lot of projects I need a way to download all in a single clone. I dont want to use GitBash or any other command line tools. I want to achieve this eclipse plugins. Please help!
You will have to write script that does it for you or to use external program like
mr
The above mr is a software that know how to handle sereveral repository types.
If you dont use anything like that you will have to write script that does something like:
- run on every folder in a given path (or give it a list of paths)
- verify that each folder is a git repository (has .git folder inside)
- execute your git command (like git fetch --all --prune or git pull ...)
I did the clone of volley library by using git clone https://android.googlesource.com/platform/frameworks/volley link but it does not create AndroidManifest.xml file and because of that android update project -p . command gives error as AndroidManifest.xml not found.Please give me the solution for this problem.
After cloning the repository you need to import it as a library project:
Git clone the repository by typing the following at the command line:
git clone https://android.googlesource.com/platform/frameworks/volley
Import the downloaded source into your app project as an Android library project (as described in Managing Projects from Eclipse with ADT, if you're using Eclipse) or make a .jar file.
The instructions for Setting up a Library Project say that the AndroidManifest.xml file must be created manually:
Creating the manifest file
A library project's manifest file must declare all of the shared components that it includes, just as would a standard Android application. For more information, see the documentation for AndroidManifest.xml.
For example, the TicTacToeLib example library project declares the activity GameActivity:
<manifest>
...
<application>
...
<activity android:name="GameActivity" />
...
</application>
</manifest>
I'm using repo to build Android. I want to build from a previous release (e.g. build #1234 from last month). I do something like this:
I start with a special copy of the manifest that explicitly sets the revision for each package:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
...
<project name="packages/apps/Browser" revision="f42301ffb36a68fadffdb87fa1bdc09aceac53cb"/>
<project name="packages/apps/Calculator" revision="481a23ed78397e35201de3638ec0d76797b77d25"/>
<project name="packages/apps/Calendar" revision="19a0737be4d51aa71a0d122f5f24ab7e53869398"/>
<project name="packages/apps/Camera" revision="67e6c190f82f0f7b8704fe5663eb92082c4cc943"/>
...
</manifest>
This is basically a copy of default.xml, but with the revision for each package specified explicitly for the commit that was in place when build #1234 was created.
So now I give the commands
cp ~/manifest-build-1234.xml .repo/manifests
repo init -m manifest-build-1234.xml
repo sync
The result: Some of the packages are set to the revision specified in the manifest, but some of the others remain at the previous head.
If I delete those packages entirely, and then do another repo sync, then the packages are checked out at the correct revision.
So my question is: short of just deleting everything before I do the repo sync, how can I guarantee that all packages are checked out at the correct revision?
Use --trace with repo command to check what steps get executed while running repo commands. e.g "repo --trace sync -j4"
I put two projects into Eclipse, called Project1 and Project2.
Project1 is independent, but Project2 must be dependent to Project1.
When I build the Project2, the error msg comes like this: Error generating final archive: duplicate entry: AndroidManifest.xml
I figured out what the problem was. I included a JAR file that had an AndroidManifest.xml file in it, which was conflicting with my own project's AndroidManifest.xml file. The solution in my instance was to rebuild the JAR file, making sure it excluded its own version of AndroidManifest.xml, then to re-include the new version of the JAR file into my project. You might need to clean the project after doing this.
I think you use Project1 as Library. So, when you export jar file you should unselect AndroidManifest.xml on "Select the resource to export".
I had got the same problem some days ago, if you put a JAR inside libs folder and the JAR has inside a AndroidManifest.xml you got the error. If you put the JAR outside the project (for example on desktop) and in "java Build Path" you use "Add external JAR" the problem is solved.
I got a second (ungracefull) AndroidManifest.xml file by including an Android.R package instead of the com.example.mypackage.R.
Symptoms: build seemed to work, but launching showed the existing Error in workspace, which needed to be fixed first.
One AndroidManifest.xml was found in classes, the other in a file called resources.ap_ .
I simply quickfixed (include android.R) workspace to hell.
edit: didn't work either, workspace still in in hell; problems in projects, which liked to be fixed...
edit1: can't find the package, with should hold the AndroidManifest.xml.
edit2: I consider to assume the second Manifest File in Android.jar - seems like each Manifest file results in generated 1 R.class. I erased complete workspace. Because it was playground anyway. (Then I set up Git.)
Cleaning the Project1 might help.
It is possible that you have similar compile time dependencies in your library project and your application project and the dex-er is not recognizing the duplicates.
If this is the case change the scope of the dependencies in your application project to the provided scope.
The dependencies will be included because they are in the library project, and they will not be duplicated because they are "provided" when compiling the application project.
You will get a series of error message related to AndroidManifest, main.xml, activity_main. So the best solution would be, rename them (using shift+ctrl+R) from one of the project to something else.
This solved my problem.
I could only fix it in Android Studio by deleting the out/ directory and letting it re-build everything again.