简体   繁体   English

无法使用ADT进行电话间隔

[英]Can't intslall phonegap with ADT

I just checked here 我只是在这里检查

PhoneGap not running in Android PhoneGap未在Android中运行

What I did are as follows 我做了如下

  1. I copied cordova-2.9.0.jar file from phonegap inside libs folder though it dont show there! 我从libs文件夹中的phonegap复制了cordova-2.9.0.jar文件,尽管那里没有显示! dont know why 不知道为什么

  2. Then made www folder under assets and added cordova-2.9.0.js file there 然后在资产下创建www文件夹,并在其中添加cordova-2.9.0.js文件

  3. Copy xml folder came with cordova source into res folder 将Cordova源附带的xml文件夹复制到res文件夹中

  4. Then I replaced mainactivity.java with this code 然后我用这段代码替换了mainactivity.java

     package com.cordovatest; import org.apache.cordova.DroidGap; import android.os.Bundle; public class MainActivity extends DroidGap { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.setIntegerProperty("loadUrlTimeoutValue", 60000); super.loadUrl("file:///android_asset/www/index.html",1000); } } 

    But I see so many errors see screenshot 但是我看到这么多错误,请看截图

    http://gyazo.com/4e1fa15d0f5926d7a6ff6524645b0952 5.Added index.html file into assets/www folder http://gyazo.com/4e1fa15d0f5926d7a6ff6524645b0952 5.将index.html文件添加到资产/ www文件夹中

  5. Then I added this code to my androidmanifest.xml 然后我将此代码添加到了androidmanifest.xml

    http://gyazo.com/8e7b079ae928d53a87a5328c37b89ae1 http://gyazo.com/8e7b079ae928d53a87a5328c37b89ae1

The screenshot link did not work, can you please check to see if that's the right URL? 屏幕快照链接无效,请检查一下是否正确的URL吗? Also did you first use the /bin/create/ script to make a sample app and THEN do these steps? 您还首先使用/bin/create/脚本制作了一个示例应用程序,然后执行这些步骤吗? Also, I'm not seeing the step where you set the Android Target API level; 另外,我没有看到设置Android Target API级别的步骤。 you need to right click on the project, click properties, then Android, then make sure that the highest Android version has been checked. 您需要右键单击该项目,依次单击属性和Android,然后确保已选中最高的Android版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM