chintaro1981 / android-python27

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

Errors using the ADT Bundle for Windows with android-python27 clone #19

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Using the ADT Bundle for Windows 
[http://developer.android.com/sdk/index.html] with android-python27 clone
2. Following [in a modified way] the "Tutorial How To Install Android SDK And 
Eclipse"
3. Following 

What is the expected output? 
Sample app should launch successfully.

What do you see instead?
(Errors ... 765 Items) [This looks like a classpath issue to me.]

What version of the product are you using? 
cloned today approx 9:07 am pacific time

On what operating system?
Windows XP SP3

Please provide any additional information below.

Here is my log of the steps i did to install and Use APK Template:
my Use APK Template Steps.log

0. For Tutorial How To Install Android SDK And Eclipse:
    1.1 At steps 2 & 3, instead of separately downloading Eclipse and the ADT at http://developer.android.com/sdk/index.html i found the ADT Bundle. The site said "It includes the essential Android SDK components and a version of the Eclipse IDE with built-in ADT (Android Developer Tools) to streamline your Android app development."
    1.2 Skipped steps 5 & 6, because the "ADT plugin for Eclipse" is PRESUMABLY already hooked up
    1.3 At steps 7 & 8, i used TortoiseHg to clone the project into:
        C:\1d\PythonPjs\androidPjs\zetc\android-python27\code.google-clone-01
Tutorial How to Use APK Template 
1. Opened adt-elcipse with C:\Documents and Settings\joe\workspace-adt-01 [This 
is an empty workspace.]
    Welcome! screen appears. [No Project Explorer]
2. I click File->Import->General->"Existing Projects into Workspace"  
    2.1. i click next
    2.2. in "Select a directory to search for existing Eclipse projects." dialog
        i chose (x) select root directory and browsed to 
            C:\1d\PythonPjs\androidPjs\zetc\android-python27\code.google-clone-01\apk
        which came up in the textArea as
            [x] PythonAPK (C:\1d\PythonPjs\androidPjs\zetc\android-python27\code.google-clone-01\apk)
        i left unchecked:
            [ ] Copy projects into workspace
            [ ] Add project to working sets     
        i clicked Finish
3. I click Window->Show View->Project Explorer
    Problems:
        Description Resource    Path    Location    Type
        Unable to resolve target 'android-15'   PythonAPK       Unknown Android Target Problem
        Unable to resolve target 'android-15'   PythonAPK       Unknown Android Target Problem
        Unable to resolve target 'android-15'   PythonAPK       Unknown Android Target Problem
        Unable to resolve target 'android-15'   PythonAPK       Unknown Android Target Problem
        Unable to resolve target 'android-15'   PythonAPK       Unknown Android Target Problem
        Archive for required library: 'libs/armeabi/libcom_googlecode_android_scripting_Exec.so' in project 'PythonAPK' cannot be read or is not a valid ZIP file   PythonAPK       Build path  Build Path Problem
        Project 'PythonAPK' is missing required source folder: 'gen'    PythonAPK       Build path  Build Path Problem
        The project cannot be built until build path errors are resolved    PythonAPK       Unknown Java Problem
    Console:
        [2012-12-29 09:47:53 - PythonAPK] Unable to resolve target 'android-15'
        [2012-12-29 09:47:53 - PythonAPK] WARNING: unable to write jarlist cache file C:\1d\PythonPjs\androidPjs\zetc\android-python27\code.google-clone-01\apk\bin\jarlist.cache
        [2012-12-29 09:47:53 - PythonAPK] Unable to resolve target 'android-15'
        [2012-12-29 09:47:53 - PythonAPK] WARNING: unable to write jarlist cache file C:\1d\PythonPjs\androidPjs\zetc\android-python27\code.google-clone-01\apk\bin\jarlist.cache
4. Because i have errors, i don't run Project->clean instead i:
    4.1 I Right click on the PythonAPK project and select Build Path->Configure Build Path, 
    4.2 then [in left panel] under Java Compiler->Building i check, previously unchecked, [x] Enable Project Specific Settings is checked. 
    4.3 Under Build Path Problems i change "Incomplete build path" from Error to Warning. 
    4.4 I Click Apply [rebuild project dialog appears & i click Yes] 
    4.5 In the Properties dialog under Java Compiler->Building I click Apply and OK.
    RESULT:
        Problems: (Errors 100 of 765 Items) [I will show the first 3. This looks like a classpath issue to me.]
            Description Resource    Path    Location    Type
            Activity cannot be resolved to a type   RpcServerLauncher.java  /PythonAPK/src/com/android/python27 line 8  Java Problem
            Activity cannot be resolved to a type   ScriptActivity.java /PythonAPK/src/com/android/python27 line 47 Java Problem
            android.os cannot be resolved to a variable FacadeConfiguration.java    /PythonAPK/src/com/googlecode/android_scripting/facade  line 54 Java Problem
5. I run Project->clean [build automatically is set]
    RESULT:
        Problems: (Errors 100 of 765 Items) [I will show the first 3. This looks like a classpath issue to me.]
            Description Resource    Path    Location    Type
            Activity cannot be resolved to a type   RpcServerLauncher.java  /PythonAPK/src/com/android/python27 line 8  Java Problem
            Activity cannot be resolved to a type   ScriptActivity.java /PythonAPK/src/com/android/python27 line 47 Java Problem
            android.os cannot be resolved to a variable FacadeConfiguration.java    /PythonAPK/src/com/googlecode/android_scripting/facade  line 54 Java Problem

I'll attach the above as a file.

Thanks in advance for your help with this.

Love and peace,
Joe

Original issue reported on code.google.com by JoeCodes...@gmail.com on 29 Dec 2012 at 7:03

Attachments:

GoogleCodeExporter commented 8 years ago
>Unable to resolve target 'android-15'

You need to download, using the SDK manager, system image for Android 4.0.3 
(API 15): http://developer.android.com/tools/help/sdk-manager.html

Original comment by anthony....@gmail.com on 29 Dec 2012 at 7:10

GoogleCodeExporter commented 8 years ago
You need also to:

- Java Compler->Building->Build path problems - set Incomplete build path: to 
Warning
- And Project->Clean

Original comment by anthony....@gmail.com on 29 Dec 2012 at 7:12

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
My response to Anthony's comments 1&2
Anthony's comment-1
"""Comment 1 by project member anthony....@gmail.com, Today (20 minutes ago) 
>Unable to resolve target 'android-15'
You need to download, using the SDK manager, system image for Android 4.0.3 
(API 15): http://developer.android.com/tools/help/sdk-manager.html
"""      
1. Opened adt-elcipse with C:\Documents and Settings\joe\workspace-adt-01 [This 
is an empty workspace.]
2. Window->"Android SDK Manager"
    2.1 in "Android SDK Manager" dialog
        - i checked [x] Android 4.0.3 (API 15)
        - Show: [x]Updates Now  [x]Installed  [ ]Obsolete
        - Sort by (x) API Level ( )  ( )Repository
    2.2 click Install 8 packages
    2.3 in choose packages to install dialog
        - 8 packages appear with '?' in front of them
        - i click (x)Accept all
        - i click Install
        - i pack a lunch as downloading proceeds :)
        RESULT:
            Done loading packages.
            All Packages say "Installed" next to them
    2.4 i close "Android SDK Manager" dialog
3. In response to anthony comment-2 
"""You need also to:
- Java Compler->Building->Build path problems - set Incomplete build path: to 
Warning
- And Project->Clean"""
    3.1 I Right click on the PythonAPK project and select Build Path->Configure Build Path, 
    3.2 then [in left panel] under Java Compiler->Building i leave as is, previously checked by me, [x] Enable Project Specific Settings is checked. 
    3.3 Under Build Path Problems i leave as is, previously changed by me, "Incomplete build path" == Warning. 
    3.4 I click Apply then OK. [No Rebuild Project? dialogappears because the project settingswere not changed]
    3.5 I click Project->clean->"Clean all projects selected below" [x]PythonAPK is checked.
    3.6 I click Project->clean->"Clean all projects" [x]PythonAPK is checked but greyed.
    RESULT for both cleans (3.5 & 3.6):
        Problems: (Errors 100 of 765 Items) 
        [see attached file "allErrors.log"]

Thanks for the help.

Love and peace,
Joe

Original comment by JoeCodes...@gmail.com on 29 Dec 2012 at 8:29

Attachments:

GoogleCodeExporter commented 8 years ago
On original post, under "What steps will reproduce the problem?", Item 3 should 
be:
3. Following Tutorial How to Use APK Template 

Original comment by JoeCodes...@gmail.com on 29 Dec 2012 at 8:33

GoogleCodeExporter commented 8 years ago
Looks like android.jar is missing in your classpath

Original comment by anthony....@gmail.com on 29 Dec 2012 at 9:07

GoogleCodeExporter commented 8 years ago
Dear Anthony,

Thanks for the help. You said, "Looks like android.jar is missing in your 
classpath". Here's what i did:

1. Opened adt-elcipse with C:\Documents and Settings\joe\workspace-adt-01 [This 
is an empty workspace.]
2. In projectExplorer: r-clicked on
    Android 4.0.3->android.jar (C:\adt-bundle-windows-x86\sdk\platforms\android-15\android.jar)
        i chose Build Path->Configure Build Path
        RESULT: up comes Properties for PythonAPK dialog
            - message at top: Build path entry is missing: PythonAPK/gen
            - in left panel: Java Build Path is selected
            - on right: 
                - Libraries tab is selected
                - Android 4.0.3 is highlighted and under it
                    - Access rules: No rules defined
                    - Native library location: (none)
                    - android.jar C:\adt-bundle-windows-x86\sdk\platforms\android-15
                        - Source attachment: (none)
                        - Javadoc location: http://developer.android.com/reference/
                        - Native library location: (none)
                        - Access rules: 1 rule defined
                            Forbidden: com/android/internal/**

Anthony, it looks to me like, pardon the pun, the jar is empty.
Do you have any ideas on how to fix it? 

I'm going to go over to the Android site, 
http://code.google.com/p/android/issues. I saw a different issue over there 
(Issue 32577) that i had working with this ADT Bundle (without Python27) when i 
searched for it.   

Meanwhile, if you know how to fix this empty jar thing, please let me know. 
Maybe it will help the Android folks as well.

Thanks for all the help, Anthony.

Love and peace,
Joe

Original comment by JoeCodes...@gmail.com on 29 Dec 2012 at 11:56

GoogleCodeExporter commented 8 years ago
Try to get android-4.0.3_r1.jar from 
http://grepcode.com/snapshot/repository.grepcode.com/java/ext/com.google.android
/android/4.0.3_r1/ , rename it to android.jar and use it in your project.

However seems smth is broken, you may want to go for a fresh Eclipse install, 
and then add the SDK + ADT.

Original comment by anthony....@gmail.com on 30 Dec 2012 at 12:17

GoogleCodeExporter commented 8 years ago
Dear Anthony,
Thanks BIG TIME for all the help.

Before i read your comment #8, I made one more effort to add the jar to my 
classpath. 
1. Right click on the PythonAPK project and select Build Path->Configure Build 
Path
2. Selected Libraries tab
3. Clicked "Add External Jars"
4. Navigated to C:\adt-bundle-windows-x86\sdk\platforms\android-15\
5. Selected android.jar
6. Did a rebuild      
RESULT: 
    *** No Errors *** only Warnings

I'll try to get the _r1.jar from repository as you suggest.

Thanks for all the help, Anthony.

Love and peace,
Joe

Original comment by JoeCodes...@gmail.com on 30 Dec 2012 at 12:32