Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question]Python for android no longer supports Error ! #1978

Closed
Mr-EMpiRe opened this issue Sep 8, 2019 · 12 comments
Closed

[question]Python for android no longer supports Error ! #1978

Mr-EMpiRe opened this issue Sep 8, 2019 · 12 comments
Labels

Comments

@Mr-EMpiRe
Copy link

Mr-EMpiRe commented Sep 8, 2019

Hi /
i have a problem after running
buildozer android debug

Build failed: python-for-android no longer supports running under Python 2. Either upgrade to Python 3.4 or higher (recommended), or revert to python-for-android 2019.07.08. Note that you *can* still target Python 2 on Android by including python2 in your requirements. Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3crystax,kivy,python3 --arch armeabi-v7a --copy-libs --color=always --storage-dir="/root/Desktop/OnlyforTest/untitled123/.buildozer/android/platform/build" --ndk-api=21 ENVIRONMENT:

my p4a version is : 2019.08.09.1.dev0
how can i solve this issue ?
i try to install p4a with pip and pip3 and installed with no error and clean.

but how can i change the requirements from p4a ?
in last line i see this error to :

Buildozer failed to execute the last command
The error might be hidden in the log above this error
Please read the full log, and search for it before
raising an issue with buildozer itself.
In case of a bug report, please add a full log with log_level = 2

Tnx for your time.

@Mr-EMpiRe Mr-EMpiRe reopened this Sep 8, 2019
@Mr-EMpiRe
Copy link
Author

Mr-EMpiRe commented Sep 8, 2019

hi again
i try to reinstall all package.
but that error still show//.

any advice ?

@tshirtman
Copy link
Member

Uninstall with pip, make sure it's only installed with pip3.

@Mr-EMpiRe
Copy link
Author

Uninstall with pip, make sure it's only installed with pip3.

hi tnx for your answer.
can u tell me how can i uninstal python for android ?
when i use p4a command. its work.
but i cant uninstall it.

@tshirtman
Copy link
Member

pip uninstall python-for-android

repeat until it says it's not installed.

then install again, but with pip3 instead of pip.
pip3 install python-for-android

if you use a virtualenv, make sure it's a python3 virtualenv.

@Mr-EMpiRe
Copy link
Author

Mr-EMpiRe commented Sep 8, 2019

pip uninstall python-for-android

repeat until it says it's not installed.

then install again, but with pip3 instead of pip.
pip3 install python-for-android

if you use a virtualenv, make sure it's a python3 virtualenv.

tnx .
dude itry uninstall with pip, pip2, pip3
and all done.
but after installing with pip3 with your command.
and run the buildozer android debug

i see that error again.
[ERROR]: Build failed: python-for-android no longer supports running under Python 2. Either upgrade to Python 3.4 or higher (recommended), or revert to python-for-android 2019.07.08. Note that you can still target Python 2 on Android by including python2 in your requirements.

@tshirtman
Copy link
Member

sorry, i missed that you used buildozer, in this case, you can just uninstall python-for-android, buildozer installs its own version anyway. I guess the solution is to use python3 to install buildozer as well, (so same thing, uninstall with pip2, then install with pip3).

@Mr-EMpiRe
Copy link
Author

sorry, i missed that you used buildozer, in this case, you can just uninstall python-for-android, buildozer installs its own version anyway. I guess the solution is to use python3 to install buildozer as well, (so same thing, uninstall with pip2, then install with pip3).

tnx MR. i try ,then post result here .

@Mr-EMpiRe
Copy link
Author

Mr-EMpiRe commented Sep 8, 2019

sorry, i missed that you used buildozer, in this case, you can just uninstall python-for-android, buildozer installs its own version anyway. I guess the solution is to use python3 to install buildozer as well, (so same thing, uninstall with pip2, then install with pip3).

hi again.
i try to uninstall what ever u said.
and buildozer made one file with python-for-android name.
anyway. , i dont have p4a installed on kali adter removing from pip3.

but after enter that command (buildozer android debug)
my first error still show!
and after removing buildozer . now i see Aidl cannot be executed
from buildozer android debug
any advice?

edit ...
i go to remove kali and install everything from begin.
but can u suggest me one fix and usfull version of buildozer and ndk and sdk to install ?

tnx

@tshirtman
Copy link
Member

buildozer will automatically install the ndk and sdk as needed, if you get the aidl error, please use this command.

    ~/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager "build-tools;29.0.0"

as documented here https://buildozer.readthedocs.io/en/latest/installation.html#aidl-not-found-please-install-it

@Mr-EMpiRe
Copy link
Author

Mr-EMpiRe commented Sep 9, 2019

buildozer will automatically install the ndk and sdk as needed, if you get the aidl error, please use this command.

    ~/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager "build-tools;29.0.0"

as documented here https://buildozer.readthedocs.io/en/latest/installation.html#aidl-not-found-please-install-it

Hi again.
dude i removed it the 29.0.2 build tools from sdk.
and installed 29.0.0 with your command.

after that i used buildozer android debug. then automatically build tools updated to 29.0.2 again !
and aidl error return.

here is full error after android debug:

Run '/root/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager "build-tools;29.0.2"'
Cwd /root/.buildozer/android/platform/android-sdk
[=======================================] 100% Unzipping... android-10/lib64/lib
Check that aidl can be executed
Search for Aidl
Run '/root/.buildozer/android/platform/android-sdk/build-tools/29.0.2/aidl'
Cwd None
Aidl cannot be executed

(i can run aidl from sdk path fut with debug cant be run)
how can i set 29.0.0 as default build tools ? i dont want 29.0.2 install automatically after running "buildozer android debug" maybe 29.0.2 not fix in my struct.
any idea ?

@Mr-EMpiRe
Copy link
Author

my problem isnt solve/ but i use windows instead linux and work well.
good luck

@Arsh1219
Copy link

pip uninstall python-for-android

repeat until it says it's not installed.

then install again, but with pip3 instead of pip. pip3 install python-for-android

if you use a virtualenv, make sure it's a python3 virtualenv.

Thanks buddy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants