包org.apache.cordova不存在机器人工作室 [英] package org.apache.cordova does not exist android studio
问题描述
大家好,感谢阅读:)
我使用的Apache Cordova提出申请,所以我做构建在终端的所有步骤:'科尔多瓦构建Android,它完美的作品,当我使用'科尔多瓦运行Android,它再次工作,打开模拟器和我可以测试应用程序。但是,当我想建立与Android的工作室,制作一个签名的apk,我有这样的错误:包org.apache.cordova不存在
错误来自该文件夹的src / fr.myapp.myapp / MainActivity:进口org.apache.cordova *;
我如何添加这个包或修复错误?我已经搜查stackoverflow.com和其他论坛,但没得到正确的答案:/
非常感谢!
*请注意,当我建立在iOS上,我没有错误,它完美的作品
您只进口了您的应用程序。不是库项目。
步骤导入的PhoneGap项目:
-
导入项目(Eclipse中,ADT等)
-
选择从目录中您的项目(不要选择Android的目录,选择将整个项目,那么只有所有的科尔多瓦库将被导入
检查是否得到这个对话框(如果没有,不是概率)
<醇开始=3>有关第2步,如果你没得到的对话框中,单击下一步,打开您的项目。
在这个文件 - >导入模块重新导入所有的库。
猜猜我是清楚的。
Hi guys and thanks for reading :) I'm using apache cordova to make application, so I've do all the step for build in terminal: 'cordova build android', it works perfectly, when I use 'cordova run android', it works again, open the simulator and I can test App. But when I want to build with android studio, for making a signed apk, I have this error : package org.apache.cordova does not exist
The error come from the folder src/fr.myapp.myapp/MainActivity: import org.apache.cordova.*;
How can I add this package or fix the error ? I've searched on stackoverflow.com and other forum but nobody give the right answer :/
Thanks a lot !
*Note that when I build on ios, I have no error and it works perfectly
You have imported only your applications. Not the library projects.
Steps to import Phonegap project :
Import Project(Eclipse,ADT etc)
Select your project from the directory(Do not select Android directory, select will the whole project, then only all the cordova libs will be imported
Check whether you get this dialog(If not, not a prob)
- If Yes, make sure you select all the libraries.
For Step 2, if you didnt get the dialog, click next and open your project. In that File-> Import Module to import all the libraries again.
Guess I'm clear
这篇关于包org.apache.cordova不存在机器人工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!