包org.apache.cordova不存在android studio [英] package org.apache.cordova does not exist android studio
问题描述
嗨家伙,谢谢阅读:)
我使用apache cordova来做应用程序,所以我已经做了所有的步骤建立在终端:'cordova构建android',它的作品完美,当我使用'cordova运行android',它再次工作,打开模拟器,我可以测试应用程序。但是当我想使用android studio构建一个签名的apk,我有这个错误:package org.apache.cordova不存在
错误来自于folder src / fr.myapp.myapp / MainActivity: import org.apache.cordova。*;
我添加这个包或修复错误?我在stackoverflow.com和其他论坛搜索,但没有人给正确的答案:/
非常感谢!
您只导入了应用程序。
导入Phonegap项目的步骤:
-
导入项目(Eclipse,ADT等)
-
从目录中选择项目(不选择Android目录,选择将整个项目, cordova库将被导入
检查您是否收到此对话框(如果没有,不是个问题)
- 如果是,选择所有库。
对于步骤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不存在android studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!