Cannot build chromium android - android

I'm trying to build android apk with instruction`.
I'm trying to run gclient runhooks this command.
but I get this error
D:\Android\chromium\src>gclient runhooks
error: Your local changes to the following files would be overwritten by checkout:
git_cl.py
tests/git_cl_test.py
Please commit your changes or stash them before you switch branches.
Aborting
Failed to update depot_tools.
I'm trying to commit, I got this
D:\Android\chromium\src>git commit
HEAD detached at origin/master
nothing to commit, working tree clean
D:\Android\chromium\src>git stash
No local changes to save
D:\Android\chromium\src>git stash pop
No stash entries found.
Please help me to build chromium apk and how to import into android-studio and run.
Thanks in advance.

The error message has an important clue:
Failed to update depot_tools.
The issue is in the depot_tools repository, not the Chromium repository itself.
In the directory where you checked out depot_tools, run git stash (non-destructive) or git reset --hard (destructive). You shouldn't need to do anything in the chromium/src directory for this particular error.

Related

Android Studio git: failed to traverse parents error

I've been running Android Studio on Windows, with git doing the versioning, and git pushing using git bash for Windows. I've been doing the same thing for all that time, without issue.
Then today, in the event log in Android Studio after opening I see:
17:29 VcsException
error: Could not read 5188c7b8677be145b04f079e6f9cab08e5c19240
fatal: Failed to traverse parents of commit 50da9e67a67598125b860984db9e493bd5d1f2ee
during executing git -c core.quotepath=false log HEAD --branches --remotes --max-count=2000 --pretty=format:%x01%H%x02%ct%x02%an%x02%at%x02%ae%x02%cn%x02%ce%x02%P%x02%s%x02%b%x02%B%x02%d%x03 --encoding=UTF-8 --decorate=full --
And when I try a git operation in the git bash console (Windows) I get:
$ git commit -m 'new stuff'
fatal: unable to read tree 4dfc5598677be145b04f079e6f9cab0833555566
The following is an extract from running git fsck... there is a long list which annoyingly in git bash is not scrollable or selectable:
$ git fsck
dangling blob 7be145b04f079e6f9cab0835664dfc5598673555
missing blob e6f9cab0835664dfc559e145b04f07986735557b
missing tree b04f07986735557be6f9cab0835664dfc559e145
... (lots of dangling blob, a few missing blob, one missing tree) ...
What can I do to fix this?
So, since I've been pushing regularly to the remote repo so I know that is pretty up to date, I followed the low-tech suggestion set out here, combined with the first comment to that suggestion.
So:
create a temporary folder in whatever location you want
clone the repo into that folder with git clone
git#bitbucket.org:myaccount/myproject.git
move the .git folder in the existing project folder out into another temporary folder somewhere
move the .git folder from the repo cloned in step 2 into the project folder, to replace the old one moved out in step 3
and that was it... a git add / commit / push we seem to be
back on track

Removing build folder from git

I have pushed a build folder to my remote repo; but the .gitignore file clearly has this line (/payu_ui/build); But i found out since the build files were already tracked once and now that i wrote a line in .gitignore will not really ignore the build folder. So i want to remove it from git from being tracked (the complete build folder) so i used this command
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch payu_ui/build/' --prune-empty --tag-name-filter cat -- --all
But every time i run this command it gives an err saying
fatal: bad revision 'rm'
So what is going wrong; every time i click the commit option from IDE it shows that 1300 files needs to be committed (its annoying me)
Any help will be appreciated;
1. I dont want to track these build files(from payu_ui lib)
2. I dont want to push them to remote repo (but its already thr and beleive once i track from local and push them it gets deleted in remote repo; if it doesn't i'll manually delete in remote repo)
Well you may just do the following,
Remove the line from gitignore for now.
Locally delete the folder.
Push out the change so the folder gets deleted from remote as well.
Now add the line to gitignore.
I recently faced the problem and that is what i did.
remove those build files (or whole folder) from your computer
rm -r [direction to files]
then add, commit and push all your changes (actually the change will be removing those files from repository), if you have set .gitignore
file properly, git will stop tracking those files

Android Studio Error: Configuration with name 'default' not found

I tried importing Anthony's Lightning Browsers source code into Android Studio.
https://github.com/anthonycr/Lightning-Browser
I did:
git submodule update --init --recursive
..as instructed too.
However, I'm getting this error
Gradle 'Lightning-Browser-dev' project refresh failed
Error:Configuration with name 'default' not found.
Please refer to the source code on Github, I don't know what code to give here to make my problem easier to understand.
Thanks in advance! :)
Are you sure you have successfully run git submodule update --init --recursive?
If this command executes successfully then the external folder inside Lightning-Browserproject should not be empty. I got the same error message Configuration with name 'default' not found. before running the above command and my external folder was empty. After running it (it takes some time since it downloads stuff) the external folder had the netcipher project required.
So I suggest make a new clone of the github project:
git clone https://github.com/anthonycr/Lightning-Browser.git
and then issue the git submodule command:
git submodule update --init --recursive
and check if the external folder is populated like in the pic below

repo about .git/HEAD: error: manifest missing or unreadable -- please run init

I was downloading android 4.4 source code using repo(in ubuntu). Last time I killed repo process by pressing the key combination: Ctrl+Z, and when I started it this time by using the command: "repo init" and "repo sync", I got the following errors:
error: in sync: [Errno 2] No such file or directory:
u'/home/ubuntu/workspace/packages/apps/VoiceDialer/.git/HEAD' error:
manifest missing or unreadable -- please run init
I've tried "run init", which displays no errors. But the problem remains after running "repo init". What should I do? Is there any way to tell repo to reproduce the ./git/HEAD file?
I solved the problem by deleting the VoiceDialer folder, then running "repo init" and "repo sync". With the .git folder in it, it may not "repo init" successfully.
I also get the problem. Here are the steps:
1. delete the folder
2. 'repo sync' the folder again.
Error is usually solved by starting your repo init from scratch. This includes deleting the folder it is downloading to. You will need to remake the directory that you deleted with
mkdir -p ~/mydirectory
at which point you will be ready to reinitialize the repo download from scratch.
If you are initializing a master repo for a build you will need to start from scratch, otherwise you will keep getting these errors.
All the answers involved deleting the whole directory. While this works, it seems like an overkill. The same result can be achieved by deleting the .repo dir that was created when running repo init at the location it was ran in.
That prevents re-downloading the whole remote repo again.
Note: If there is no such dir at the current location, it may be in one of the parent directories.
I solved this by going to /usr/bin/repo and changing the manifest pointer from 'manifest' to 'manifest.git'
Using an older version of git, 2.14 that's 3rd party for Centos 6.6

error syncing with cyanogenmod repo

I have followed the instructions here to get the cynogenmod source on my system.
i was able to do the build successfully. I didn't do any local source changes. Now when i try to get the latest source using repo sync command, I am getting the following errors
error: Your local changes to the following files would be overwritten by checkout:
Android.mk
extendedcommands.c
flashutils/Android.mk
flashutils/flashutils.c
flashutils/flashutils.h
mounts.c
mounts.h
nandroid.c
roots.c
Please, commit your changes or stash them before you can switch branches.
Aborting
error: Your local changes to the following files would be overwritten by checkout:
encore.mk
init.encore.rc
Please, commit your changes or stash them before you can switch branches.
Aborting
<few more errors like this.........>
error: bootable/recovery/: CyanogenMod/android_bootable_recovery checkout 50822991460cbee65757e9de12b29e39238d6386
error: device/bn/encore/: CyanogenMod/android_device_bn_encore checkout f6586ab41f0e3f5acfa16b43f9b17008e9bb0524
I have tried repo forall -c git reset --hard HEAD without success.
Any suggestions on how i can resolve these errors?
Apparently I was facing this issue because I had the repository on an NTFS partition. NTFS was not storing the permissions on the file properly and Git was seeing that as a change.
You can force Git to ignore the permissions on the file while looking for changes by using the following command:
repo forall -c git config core.filemode false
(Not sure if this has any side effect. If there is, please let me know!)

Categories

Resources