当我在Android设备上运行应用程序时,我收到此错误,并且inappbrowser无法帮助我...
错误
#define EMPTY -1
struct CHAMPION{
int champ_ID;
int weaponL_ID;
int weaponR_ID;
}
vector<string> Champions;
int getChampIndex("struct_obj" obj, int value){
for(int i=0; i<Champions.size(); i++){
if(Champions[i].obj == value){return i;}
}
}
int main(){
//fill Champions vector
SearchedChamp = getChampIndex(champ_ID, 17);
//process SearchedChamp
NoWeaponL = getChampIndex(weaponL_ID, EMPTY);
//process NoWeaponL
NoWeaponR = getChampIndex(weaponR_ID, EMPTY);
//process NoWeaponR
}
答案 0 :(得分:1)
当你运行 cordova平台添加android 然后 cordova build android 时,你应该得到一个 cordova.js添加的项目/ platforms / android / assets / www文件夹即可。您不需要在js文件中添加它。所以,只需在index.js文件中声明它,如下所示,
<script src="cordova.js"></script>
答案 1 :(得分:0)
更改此
<script src="js/cordova.js"></script>
到
<script src="cordova.js"></script>