2012-06-11 6 views
0

Phonegap (cordova)을 사용하여 Android 에뮬레이터에 sencha touch 2.0 프로젝트를 설치하려고합니다.Cordova phonegap on eclipse/Android

나는 튜토리얼에서 언급 한 단계를 따라 HelloWorld 예제를 시도해 보았다. , super.loadUrl("file:///android_asset/www/index.html");

그러나 응용 프로그램을 실행 한 후 :

나는 나는 다음과 같은 한의 코르도바 jar 파일은 XML 폴더는 메인 클래스에서 또한

을 추가 assests 폴더에 www 디렉토리에 내 프로젝트를 넣어

[2012-06-11 15:48:27 - PhoneGap] Uploading PhoneGap.apk onto device 'emulator-5554' 
[2012-06-11 15:36:13 - PhoneGap] Uploading PhoneGap.apk onto device 'emulator-5554' 
[2012-06-11 15:38:10 - PhoneGap] Installing PhoneGap.apk... 
[2012-06-11 15:38:12 - PhoneGap] Installation failed due to invalid APK file! 
[2012-06-11 15:38:12 - PhoneGap] Please check logcat output for more details. 
[2012-06-11 15:38:13 - PhoneGap] Launch canceled! 

로그 캣 :

06-11 13:00:27.003: DEBUG/SntpClient(65): request time failed: java.net.SocketException: Address family not supported by protocol 
06-11 13:04:24.309: DEBUG/dalvikvm(141): GC_EXPLICIT freed 1K, 12% free 14374K/16327K, paused 11ms+5ms 
06-11 13:05:27.041: DEBUG/SntpClient(65): request time failed: java.net.SocketException: Address family not supported by protocol 
06-11 13:06:05.003: INFO/installd(34): free_cache(6710880) avail 4059136 
06-11 13:06:05.009: ERROR/installd(34): cannot open /data/secure/data/: No such file or directory 
06-11 13:06:05.341: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.349: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.349: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.370: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.370: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.370: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.370: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.401: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.431: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.431: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.453: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.453: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.453: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.453: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.459: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.459: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.459: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.459: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.459: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.459: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.459: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.459: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.459: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.459: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.459: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.473: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.479: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.479: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.479: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.479: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.479: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.479: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.479: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.502: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.519: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.519: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.519: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.519: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.519: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.519: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.519: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.519: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.519: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.529: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.529: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.529: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.529: ERROR/installd(34): Couldn't openat cache: No such file or directory 
06-11 13:06:05.539: WARN/PackageManager(65): Couldn't clear application caches 
06-11 13:06:05.539: INFO/DeviceStorageMonitorService(65): Running low on memory. Sending notification 
06-11 13:06:05.871: DEBUG/Tablet/NotificationPanel(266): notificationCount=1 
06-11 13:06:06.123: INFO/dalvikvm(266): Jit: resizing JitTable from 512 to 1024 
06-11 13:06:06.209: WARN/ActivityManager(65): Unable to start service Intent { act=com.android.email.intent.action.MAIL_SERVICE_CANCEL cmp=com.android.email/.service.MailService }: not found 
06-11 13:06:12.769: DEBUG/dalvikvm(286): GC_EXPLICIT freed 67K, 9% free 6420K/6983K, paused 4ms+10ms 
0 그것은 콘솔에 다음을 보여

cordova.js 파일을 포함하도록 index.html 파일을 업데이트해야합니까 ??

+1

은'지옥 그래 ... 당신의 index.html을 – Rajesh

+1

에 대한 로그 캣 출력을 확인하시기 바랍니다 <스크립트 ID = "microloader"유형 = " text/javascript "src ="sdk/microloader/development.js ">

+0

내가 그것을 포함에 cordova.js 파일 같은 문제를 포함 더 details.' – Developer

답변

0

이클립스를 사용하여 네이티브 android 응용 프로그램을 만들면 안드로이드 에뮬레이터에서 sencha 응용 프로그램을 실행하는 것이 정말 간단합니다.

나는 간단한 작업을 수행 할 수 있습니다.

1) phonegap을 설치하려면 MDS 박수 폰 갭 http://wiki.phonegap.com/w/page/34483744/PhoneGap%20Eclipse%20PlugIn%20for%20Android을 사용하는 것이 좋습니다.

2) 설치가 끝나면 상단에 전화 간격 아이콘이 표시됩니다.

3) 그런 다음 최소 전화 간격 프로젝트를 만들려면 클릭하십시오.

4) 그러면 필요하지 않은 항목이있는 색인 파일이 표시됩니다. u는 당신이 자산 u는 엽차 응용 프로그램을 만드는 데 필요한 폴더를 만들 수 있습니다 폴더에 유 also.then phonegap.js을 포함 할 수있는 기능 전화 간격을 사용하려는 경우)

<!DOCTYPE html> 
    <html> 
    <head> 
    <title>The Sencha Touch List Component</title> 
    <link rel="stylesheet" href="app.css" type="text/css"> 

    <script type="text/javascript" src="touch/sencha-touch-all.js"></script> 
    <script type="text/javascript" charset="utf-8"> 
    Ext.Loader.setConfig({ 
    enabled: true, 
    paths: { 'Ext': 'touch/src' } 
    }); 
    </script> 
<script type="text/javascript" src="app.js"></script> 
    </head> 
    <body></body> 
    </html> 

5 다음과 같이 인덱스 파일을 교체 할 수 있습니다. 앱 폴더, 스타일 폴더, 터치 폴더 및 CSS 파일과 앱과 같은 기타 필요한 것들은 www 폴더 안에 있습니다.

6) 이클립스에서만 웹 브라우저에서 index.html 파일을 체크 아웃하여 구성이 올바른지 여부를 확인할 수 있습니다.

7) 만약 그렇다면 u가 ur android 에뮬레이터에서 응용 프로그램을 실행할 수있는 것과 동일한 방식으로 ur 기본 응용 프로그램을 수행합니다.

관련 문제