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

Executed APK is crashing in every scenario #28

Open
GoogleCodeExporter opened this issue Apr 5, 2015 · 14 comments
Open

Executed APK is crashing in every scenario #28

GoogleCodeExporter opened this issue Apr 5, 2015 · 14 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

Using newest Android 4.2.2

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

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

Thanks for your feedback.

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

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

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

No branches or pull requests

1 participant