need help for error "SyntaxError: invalid syntax" (Initializing a Repo client ) - General Questions and Answers

Hello, every one.
I am trying to build my own lineageos 17.1 for Honor 5X, am using Ubuntu 18.04.
When i am doing "Initializing a Repo client", and get the following error:
[email protected]:~/android/lineage$ repo init -u https://android.googlesource.com/platform/manifest
File "/home/david/android/lineage/.repo/repo/main.py", line 79
file=sys.stderr)
^
SyntaxError: invalid syntax
I update Python "
[email protected]:~/android/lineage$ python3.10 --version
Python 3.10.5
But still can not go through this problem.
I searched online to try solve this problem, unfortunately can not figure out.
My openjdk version is 11, lineageos 17.1 require 9, but can not get version 9.
Thanks in advance.

it looks like i found the solution for this problem.
It might be the git version, i checked the git version, it is not the latest, so update, then i can
Initializing a Repo client , then go to the next step: repo sync.​

Related

[Resolved] Android Source Repo Download Help (Python Issue?)

NOTE: I Am On Linux Mint 9 32 bit
Okay So I Have Lately been trying TO Get The Latest Android Source Code From Google
Now I Follow The Instructions Down To The Wire (The Ones For Ubuntu, But They Should In Theory Work For Mint 9), And Everything Works Up Until I get To This Part:
Initializing a Repo client
Run "repo init" to bring down the latest version of Repo with all its most recent bug fixes. You must specify a URL for the manifest:
$ repo init -u git://android.git.kernel.org/platform/manifest.git
If you would like to check out a branch other than "master", specify it with -b, like:
$ repo init -u git://android.git.kernel.org/platform/manifest.git -b cupcake
When prompted, configure Repo with your real name and email address. If you plan to submit code, use an email address that is associated with a Google account .
A successful initialization will end with a message such as
repo initialized in /mydroid
Your client directory should now contain a.repodirectory where files such as the manifest will be kept.
Click to expand...
Click to collapse
And When I Try To Run That Line Through The Terminal I Get This Error:
Code:
Traceback (most recent call last):
File "/bin/repo", line 91, in ?
import readline
ImportError: No module named readline
Now I Know What The Problem is, It Is Looking For The readline.so in the the lib folder, Yet Even Though It Is There It Still Wont Work.
Now I Have Tried All 2.x.x Versions Of Python (2.4.6, 2.5.5, & 2.6.4) and None Of Them Work.
Also With Each Version I Run:
Code:
$ ./configure --enable-readline
And Still the Same Error.
i Have Been working On this For About 3 Hours Now And Still Now Luck.
I Tried A Google Search But Every Topic Get Close To Helping Someone Get It Then Stops.
Please Help Me Out Here ?
Okay So I Found The Solution.
repo runs STRICTLY off of 2.4.x and for some reason when I installed Python 2.4.6 readline.so was never put into:
Code:
/usr/local/lib/python2.4/lib-dynload/
So I copied the readline.so from my Python 2.6.4 folder (File Download Below)
and put it into:
Code:
/usr/local/lib/python2.4/lib-dynload/
Then I ran repo again and it worked fine.
Although it withh give you an API mismatch warning, but so far it has worked fine
i had that problem so i edited repo itself and deleted line 91

[Q] Issue with repo sync on CM10.2

Hello,
I'm just starting to dive into the world of android development.
Therefor I wanted to have a look at the CM source code for my One S and maybe build it on my own.
What I did:
I followed this wiki http://wiki.cyanogenmod.org/w/Build_for_ville
When did everything start to go wrong:
$ repo sync @ http://wiki.cyanogenmod.org/w/Build_for_ville#Download_the_source_code
$ repo sync ends with errors on checkout:
error: packages/apps/Settings/: CyanogenMod/android_packages_apps_Settings checkout 561d03e5163df4f8b3265d0db3e46fa649b4058d
error: prebuilts/eclipse/: platform/prebuilts/eclipse checkout 127a8c3026fc57fdb7cd0f5183a94043f45e4afe
error: prebuilts/gcc/darwin-x86/arm/arm-eabi-4.6/: platform/prebuilts/gcc/darwin-x86/arm/arm-eabi-4.6 checkout b4a17d2eddd3d40bc665260c40d7bd38fe7b1e7b
and
$ brunch ville fails
I've already searched google but didn't find anything appropriate...
I hope someone can help me resolving this issue.
I'm quite new to Linux and Git, so maybe I'm missing some basics.
Thank you in advance!
eXtatic

Compiling error ../repo/android.got is HTML?

I just got everything working for the first time finally and I'm not sure how to get around this. Every compiling/building guide says to execute the following with appropriate URL and branch, but it gives me the (second) below.
Code:
repo init –u git://github.com/user/android.git –b cm-10.2
Code:
[email protected]:~/android/omni$ repo init -u git://github.com/mike64221/android.git -b android-4.4
/home/mike/bin/repo: line 1: syntax error near unexpected token `newline'
/home/mike/bin/repo: line 1: `<!DOCTYPE html>'
I just can't figure it out. Could anyone help?
Yes, I am (attempting) to build Omni.
Hopefully there'll be some possible solutions by morning so I can go ahead and let it work during school.
Sent from my MB886 using Tapatalk

Error syncing Cyanogen Mode Repo

Hi,
I'm syncing the actual build of Cyanogenmod for lg 990p from Tonyp - At 99% I got the follwing error:
PHP:
Fetching project platform/external/chromium_org/third_party/WebKit
Fetching project CyanogenMod/android_packages_apps_UnifiedEmail
Fetching projects: 99% (469/473) Fetching project platform/external/chromium_org/v8
error: Cannot fetch cyngn/android_vendor_cyngn
error: Exited sync due to fetch errors
Commands I have used:
PHP:
git config --global user.email "[email protected]"
git config --global user.name "myname"
repo init -u git://github.com/p990-dev/android_manifest.git -b cm-11.0-tonyp
repo sync
Normal I would ask directly in the active development thread (http://forum.xda-developers.com/showthread.php?t=2769730), but unfortunately I have not enough posts to ask there.
Any Ideas what I am doing wrong?
Or is there an issue with the Repo?
Thanks in Advance
Patrick
answer to issue
this is an issue with the repo, or specifically with the default manifest. It appears that when the vendor/cyngen repo was removed, the manifest was not updated to not look for it. The simplest solution is simply to run repo sync with -f, which will force it to download all other packages. The more elaborate, and correct solution is to create or edit a file called local_mainfest.xml in working_directory/.repo/local_maifests that includes this:
Code:
<manifest>
<remove-project path="vendor/cyngn" name="cyngn/android_vendor_cyngn" />
</manifest>
This should allow you to repo sync successfully (if it still gives errors, make sure there is not a directory called "cyngn" in vendor/. If there is, just remove it, and sync up again.) I am still test ing make sure the build will complete successfully with these modifications. I will post back tomorrow (well, later today) once my build completes, or errors out.
I can confirm that this works. I had to work through some unrelated qirks before I could get a successful build and confirm, but it did build without the cyngen package, so the solution is to create a local_mainfest that excluded that package.

Building AOSP

I am trying to build AOSP. I have followed some instructions and the best are the instructions of Sony. But when I come to the point to clone the local_manifests, I need to have another file. I have found the AOSP-bacon repo on github where is a local_manifests to clone. So I have done that but when I try to sync the repo with the command 'repo sync' it gives this back:
[email protected]:~/android$ repo sync
fatal: remove-project element specifies non-existent project: platform/build
I have searched but could not find the answer what to do now. Can someone help me or say what I need to do to build AOSP?
Lennert_F said:
I am trying to build AOSP. I have followed some instructions and the best are the instructions of Sony. But when I come to the point to clone the local_manifests, I need to have another file. I have found the AOSP-bacon repo on github where is a local_manifests to clone. So I have done that but when I try to sync the repo with the command 'repo sync' it gives this back:
[email protected]:~/android$ repo sync
fatal: remove-project element specifies non-existent project: platform/build
I have searched but could not find the answer what to do now. Can someone help me or say what I need to do to build AOSP?
Click to expand...
Click to collapse
try deleting platform/build manually from the source and delete the same from the local_manifest.xml file then do a repo sync.

Categories

Resources