欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

將cantk runtime嵌入到現(xiàn)有的APP中的方法

 更新時(shí)間:2018年12月18日 15:11:07   作者:李先靜  
今天小編就為大家分享一篇關(guān)于將cantk runtime嵌入到現(xiàn)有的APP中的方法,小編覺得內(nèi)容挺不錯(cuò)的,現(xiàn)在分享給大家,具有很好的參考價(jià)值,需要的朋友一起跟隨小編來看看吧

1,先取cantk-runtime-demos到本地:

git clone https://github.com/drawapp8/cantk-runtime-demos

2,創(chuàng)建一個(gè)Android App(或者拷貝現(xiàn)有的項(xiàng)目):

cd cantk-runtime-demos
android create project -n MyApp -k com.demo -a MyAppActivity -p ./MyApp -t 
cd MyApp

3,合并phonegap和cantk-runtime相關(guān)文件。

GAMERUNNER=../GameRunner/platforms/android
mkdir -p assets
cp -rvf $GAMERUNNER/libs .
cp -rvf $GAMERUNNER/src/* src/.
cp -arvf $GAMERUNNER/res/xml res
cp -arvf $GAMERUNNER/assets/www assets/
cp -rfv $GAMERUNNER/CordovaLib/src/* src/.
rm -rf assets/www/cordova-js-src/

4,修改AndroidManifest.xml,增加activity

<activity android:name="com.tangide.GameRunnerActivity" android:label="@string/app_name">
</activity>

5,啟動(dòng)GameRunnerActivity

import com.tangide.GameRunnerActivity;
...
Intent intent = new Intent();
Bundle bundle = new Bundle(); 
intent.setClass(EmbedDemoActivity.this, GameRunnerActivity.class);
bundle.putString("url", "file:///mnt/sdcard-ext/cantk-rt-root/game1/index.html");
intent.putExtras(bundle);
startActivity(intent);

(請(qǐng)把游戲放在SDCARD中,路徑與上面指定的URL一致, EmbedDemo/examples/里有測(cè)試游戲)

6,編譯安裝

ant debug
adb install -r bin/MyApp-debug.apk

如果編譯不過,請(qǐng)修改project.properties:

target=android-21

示例:https://github.com/drawapp8/cantk-runtime-demos/tree/master/EmbedDemo

總結(jié)

以上就是這篇文章的全部?jī)?nèi)容了,希望本文的內(nèi)容對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,謝謝大家對(duì)腳本之家的支持。如果你想了解更多相關(guān)內(nèi)容請(qǐng)查看下面相關(guān)鏈接

相關(guān)文章

最新評(píng)論