zionhigt / android-python27

Automatically exported from code.google.com/p/android-python27
0 stars 0 forks source link

Executed APK is crashing in every scenario #28

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Download the Android-adt Eclipse
2. Import the template eclipse project and set everything to be working (Just 
warn if buildpath is incomplete)
3. Run the built PythonAPK.apk on any Android. It won't even start and give you 
the option to install...

What is the expected output? What do you see instead?
Expected:
The install button shows up (the application starts) and you can execute the 
sample hello.py script through the apk file.
Saw:
http://pastebin.com/y7UBXawJ

What version of the product are you using? On what operating system?
Newest version cloned from github. I'm running it on linux

Please provide any additional information below.

Original issue reported on code.google.com by Korbinia...@gmail.com on 28 May 2013 at 8:15

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
What's the Android version you've been using ?

I hit something like that once (java.lang.ClassNotFoundException), it was an 
Eclipse/ADT problem where it messed up building properly the APK, you may hit 
the same trouble. You can unzip the APK and check within if the class 
com.android.python27.ScriptApplication exists or not, if not you would need to 
delete the project, create it again and retry.

Original comment by anthony....@gmail.com on 28 May 2013 at 8:22

GoogleCodeExporter commented 8 years ago
Using newest Android 4.2.2

Original comment by Korbinia...@gmail.com on 28 May 2013 at 8:29

GoogleCodeExporter commented 8 years ago
So yes you're right the class is not in the APK but even after re-importing or 
even using a whole new workspace I still get the same problem and its not 
adding the class-files to the APK. But when I extract the sample PythonAPK.apk 
from your site its also not including the class-file but its still working??? 
I'm very confused...

Original comment by Korbinia...@gmail.com on 28 May 2013 at 8:43

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
If you check with dex2jar (http://code.google.com/p/dex2jar/) the PythonAPK.apk 
from this site you will find the class:

1. Unzip the APK
2. Run: d2j-dex2jar classes.dex, this will create classes-dex2jar.jar
3. Unzip classes-dex2jar.jar
4. Browse classes-dex2jar folder and check classes there (you can also use 
jd-gui: http://java.decompiler.free.fr/?q=jdgui )

I'm not using the Eclispe ADT bundle provided by Google but regular Eclipse 
J2EE Juno + ADT r21.1 (not the ADT r22 yet as seems still rather buggy).

Original comment by anthony....@gmail.com on 28 May 2013 at 8:58

GoogleCodeExporter commented 8 years ago
I'm just too stupid to get this to work this evening, I will try that again 
tomorrow but thanks for your help anyways

Original comment by Korbinia...@gmail.com on 28 May 2013 at 9:37

GoogleCodeExporter commented 8 years ago
After I re-setup Eclipse with an older Android SDK Version, it worked perfectly 
for me! Thank you very much!

You should maybe add a hint in the wiki that the Eclipse-ADT (at least the 
newest) doesn't work very well with the Eclipse project template.

Can be closed

Original comment by Korbinia...@gmail.com on 29 May 2013 at 8:15

GoogleCodeExporter commented 8 years ago
Thanks for your feedback.

Original comment by anthony....@gmail.com on 29 May 2013 at 8:19

GoogleCodeExporter commented 8 years ago
Sorry for bugging again but:
Earlier I was testing it with the Python3.2 APK which was&is working fine in my 
newly set up environment, but when I try the python2.7 APK, I get the same 
error over and over again. I tried re-importing, cleaning the project and I 
opened classes.dex which contains the classes that it is complaining about...

Original comment by Korbinia...@gmail.com on 29 May 2013 at 8:57

GoogleCodeExporter commented 8 years ago
Can you put somewhere your Python2.7 APK so I can try it ?

Original comment by anthony....@gmail.com on 29 May 2013 at 9:06

GoogleCodeExporter commented 8 years ago
Link to my Python2.7 APK:
http://owncloud.mineguild.de/public.php?service=files&t=0fc70bd7ef9c56670c354a29
bc7412ca

Original comment by Korbinia...@gmail.com on 29 May 2013 at 9:23

GoogleCodeExporter commented 8 years ago
Really looks an Eclipse/ADT bug, I guess the APK is malformed somehow, I 
retried building the latest PythonAPK 2.7 with Eclipse Juno + ADT r21.1.0 which 
worked.

Suggestions:

- try right click on the project, android tools, fix project properties
- try to rebuild from another workspace
- clean reinstall of Eclipse/ADT

Original comment by anthony....@gmail.com on 29 May 2013 at 9:56

GoogleCodeExporter commented 8 years ago
Same problem still unfixed for me :(
java.lang.ClassNotFoundException: com.android.python27.ScriptApplication
Android SDK Tool rev. 21
Eclipse SDK Version: 4.2.2 Build id: M20130204-1200

Original comment by emmanuel...@gmail.com on 9 Jun 2013 at 10:21