HSPポータル
サイトマップ お問い合わせ


HSPTV!掲示板


未解決 解決 停止 削除要請

2017
0305
りゅうじHSP3DISHのビルドがどうしてもうまくいかないです3解決


りゅうじ

リンク

2017/3/5(Sun) 22:39:11|NO.78374

こんばんは。
HSP3DISHのビルドがどうしてもうまくいかないので助けてください。

HSP3DISHの本を買ったり、ネットを調べたりして以下の環境を作りました。

OSは、windows10 64bit
インストールしたHSPのバージョンは、hsp35betaです。
JDK(Java Development Kit)は、jdk-6u45-windows-i586.exeを
android開発環境(SDK)は、android-sdk_r24.3.3-windows.zipを
Android NDK(Native Development Kit)は、android-ndk-r10e-windows-x86.zipを
Apache Antは、apache-ant-1.10.1-bin.zipを
インストールしました。

インストール後のフォルダ構成は、

C:\Program Files (x86)\Java\jdk1.6.0_45
C:\android\android-sdk-windows
C:\android\android-ndk-r10e
C:\android\apache-ant-1.10.1
C:\android

です。

ビルドに必要なPlatform APIのインストールを行ない、
HSP3DISHの本やネットの説明通り、ビルドする前にプロジェクトを作成しました。
まずはサンプルのブロック崩しのソース「block3.hsp」をビルドしようと思い、
それ用に「testblock」というプロジェクトを作成しました。

プロジェクト名:testblock
ID:"android-17"

コンソール画面で、
----------------------------
HSPlibフォルダを設定しています
プロジェクトの更新中
終了しました。
----------------------------
と表示され、無事にC:\androidの中に「testblock」の
プロジェクトフォルダが作成されますが、
同じ、C:\androidの中になぜか「hsplib35b4」ファルダも作成されます。

「hsplib35b4」のプロジェクトフォルダがなぜ作られるのかは
分からないのでこれは無視して、
サンプルのブロック崩しのソースをビルドしました。
すると、

コンソール画面で、
----------------------------
ソーススプリクト:block3.hsp
HSP変換処理中
UTF-8に変換中
変換処理終了しました。
NDKビルド処理中
testblockビルド処理中
終了しました。
----------------------------

と表示され、無事にビルドが終了した感じになりましたが、
binフォルダ内が空で何も入っていない状態です。
apkファイルが作られない状態。

掲示板の過去ログも調べて同じような症状の人がいたのですが、
どうも僕の場合と原因が違うのか、どうしてもうまくいきません。
昨日の土曜日からいままでずっといろいろ試しているのですが、
どうしてもうまくいかずもうくじけそうです。
DISHってビルドが成功するまでの環境を作るの難しすぎます。(TT)
どなたか原因を教えてもらえないでしょうか。
よろしくお願いします。

ビルド時のコンソールログです。

#HSP script preprocessor ver3.5beta4 / onion software 1997-2016(c)
#Use file [hspdef.as]
#HSP code generator ver3.5beta4 / onion software 1997-2016(c)
#未初期化の変数があります(key)
#未初期化の変数があります(bsize)
#Code size (1854) String data size (206) param size (0)
#Vars (38) Labels (8) Modules (0) Libs (0) Plugins (1)
#No error detected. (total 2466 bytes)
use HSP3Dish mode.

Android NDK: WARNING:jni/Android.mk:testblock: non-system libraries in linker flags: -lobaqlib
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
[armeabi-v7a] Compile++ thumb: testblock <= hsp3r.cpp
jni/hsp3embed/hsp3r.cpp: In member function 'int Hsp3r::Reset(int, int)':
jni/hsp3embed/hsp3r.cpp:75:76: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
dpm_ini( "/data/data/hsp20170305.testblock/lib/libhsp3dish.so",0,-1,-1 );
^
[armeabi-v7a] Compile++ thumb: testblock <= hspsource.cpp
jni/hsp3embed/hspsource.cpp: In function 'void __HspEntry()':
jni/hsp3embed/hspsource.cpp:118:30: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
PushStr("繝悶Ο繝・け蟠ゥ縺・);
^
jni/hsp3embed/hspsource.cpp: In function 'void L0001()':
jni/hsp3embed/hspsource.cpp:219:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
PushStr("SCORE:"); PushVar(Var_score,0); CalcAddI();
^
jni/hsp3embed/hspsource.cpp: In function 'void L0002()':
jni/hsp3embed/hspsource.cpp:549:21: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
PushStr("GAME OVER");
^
[armeabi-v7a] Compile++ thumb: testblock <= javafunc.cpp
jni/javafunc.cpp: In function 'void makePostParam(char*)':
jni/javafunc.cpp:314:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jcall_SSI_int( "httpParamSet", (char *)st1, "", 1 );
^
jni/javafunc.cpp: In function 'void makePostParamPair(char*)':
jni/javafunc.cpp:336:43: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jcall_SSI_int( "httpParamSet", "", "", 0 ); // パラメーターをリセット
^
jni/javafunc.cpp:336:43: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/javafunc.cpp: In function 'int j_httpRequest(char*, char*, int)':
jni/javafunc.cpp:372:58: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
return jcall_SSI_int( "httpRequestGET", msg1, "", type );
^
jni/javafunc.cpp:376:58: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
return jcall_SSI_int( "httpRequestPOST", msg1, "", type );
^
[armeabi-v7a] Compile thumb : testblock <= main.c
[armeabi-v7a] Compile thumb : testblock <= hsp_native_app_glue.c
[armeabi-v7a] Compile++ thumb: testblock <= hsp3code.cpp
jni/../../hsplib35b4/hsp3embed/hsp3code.cpp: In function 'char* code_getdebug_varname(int)':
jni/../../hsplib35b4/hsp3embed/hsp3code.cpp:2540:35: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
if ( mem_di_val == NULL ) return "";
^
[armeabi-v7a] Compile++ thumb: testblock <= hsp3embed.cpp
[armeabi-v7a] Compile++ thumb: testblock <= hspvar_util.cpp
[armeabi-v7a] Compile++ thumb: testblock <= misc.cpp
[armeabi-v7a] Compile++ thumb: testblock <= dpmread.cpp
[armeabi-v7a] Compile++ thumb: testblock <= hsp3debug.cpp
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
};
^
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
jni/../../hsplib35b4/hsp3/hsp3debug.cpp:122:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
[armeabi-v7a] Compile++ thumb: testblock <= hsp3gr_dish.cpp
jni/../../hsplib35b4/hsp3/hsp3gr_dish.cpp: In function 'int cmdfunc_extcmd(int)':
jni/../../hsplib35b4/hsp3/hsp3gr_dish.cpp:1289:41: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
webtask->setData( HTTPINFO_DATA, "" ); // 蜿嶺ソ。繝・・繧ソ繧堤エ譽・☆繧・
^
[armeabi-v7a] Compile++ thumb: testblock <= hsp3int.cpp
[armeabi-v7a] Compile++ thumb: testblock <= hspvar_core.cpp
[armeabi-v7a] Compile++ thumb: testblock <= hspvar_double.cpp
jni/../../hsplib35b4/hsp3/hspvar_double.cpp: In function 'void HspVarDouble_Init(HspVarProc*)':
jni/../../hsplib35b4/hsp3/hspvar_double.cpp:252:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
p->vartype_name = "double"; // 繧ソ繧、繝怜錐
^
[armeabi-v7a] Compile++ thumb: testblock <= hspvar_int.cpp
jni/../../hsplib35b4/hsp3/hspvar_int.cpp: In function 'void HspVarInt_Init(HspVarProc*)':
jni/../../hsplib35b4/hsp3/hspvar_int.cpp:273:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
p->vartype_name = "int"; // 繧ソ繧、繝怜錐
^
[armeabi-v7a] Compile++ thumb: testblock <= hspvar_label.cpp
jni/../../hsplib35b4/hsp3/hspvar_label.cpp: In function 'void HspVarLabel_Init(HspVarProc*)':
jni/../../hsplib35b4/hsp3/hspvar_label.cpp:106:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
p->vartype_name = "label"; // 繧ソ繧、繝怜錐
^
[armeabi-v7a] Compile++ thumb: testblock <= hspvar_str.cpp
jni/../../hsplib35b4/hsp3/hspvar_str.cpp: In function 'void HspVarStr_Init(HspVarProc*)':
jni/../../hsplib35b4/hsp3/hspvar_str.cpp:299:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
p->vartype_name = "str"; // 繧ソ繧、繝怜錐
^
[armeabi-v7a] Compile++ thumb: testblock <= hspvar_struct.cpp
jni/../../hsplib35b4/hsp3/hspvar_struct.cpp: In function 'void HspVarStruct_Init(HspVarProc*)':
jni/../../hsplib35b4/hsp3/hspvar_struct.cpp:183:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
p->vartype_name = "struct"; // 繧ソ繧、繝怜錐
^
[armeabi-v7a] Compile++ thumb: testblock <= hspwnd_dish.cpp
jni/../../hsplib35b4/hsp3/hspwnd_dish.cpp: In member function 'void Bmscr::Cls(int)':
jni/../../hsplib35b4/hsp3/hspwnd_dish.cpp:341:21: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SetFont( "", 18, 0 );
^
[armeabi-v7a] Compile++ thumb: testblock <= hspwnd_obj.cpp
jni/../../hsplib35b4/hsp3/hspwnd_obj.cpp: In function 'void Object_ButtonDraw(HSPOBJINFO*)':
jni/../../hsplib35b4/hsp3/hspwnd_obj.cpp:56:33: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
bm->SetFontInternal( "", 18, 0 );
^
[armeabi-v7a] Compile++ thumb: testblock <= random.cpp
[armeabi-v7a] Compile++ thumb: testblock <= stack.cpp
[armeabi-v7a] Compile++ thumb: testblock <= strbuf.cpp
[armeabi-v7a] Compile++ thumb: testblock <= strnote.cpp
jni/../../hsplib35b4/hsp3/strnote.cpp: In member function 'int CStrNote::PutLine(char*, int, int)':
jni/../../hsplib35b4/hsp3/strnote.cpp:215:28: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
if ( nstr == NULL ) { nstr=""; }
^
[armeabi-v7a] Compile++ thumb: testblock <= sysreq.cpp
[armeabi-v7a] Compile++ thumb: testblock <= supio_ndk.cpp
jni/../../hsplib35b4/hsp3/ndk/supio_ndk.cpp: In function 'int dirlist(char*, char**, int)':
jni/../../hsplib35b4/hsp3/ndk/supio_ndk.cpp:369:27: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
sbStrAdd( target, "\n" );
^
[armeabi-v7a] Compile++ thumb: testblock <= hsp3ext_ndk.cpp
[armeabi-v7a] Compile++ thumb: testblock <= hgiox.cpp
[armeabi-v7a] Compile++ thumb: testblock <= hgtex.cpp
[armeabi-v7a] Compile thumb : testblock <= stb_image.c
[armeabi-v7a] Compile++ thumb: testblock <= mmman.cpp
[armeabi-v7a] Compile++ thumb: testblock <= webtask_ndk.cpp
jni/../../hsplib35b4/hsp3/ndk/webtask_ndk.cpp: In member function 'char* WebTask::getData(int)':
jni/../../hsplib35b4/hsp3/ndk/webtask_ndk.cpp:104:9: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
return "";
^
[armeabi-v7a] SharedLibrary : libtestblock.so
[armeabi-v7a] Install : libtestblock.so => libs/armeabi-v7a/libtestblock.so

java.lang.UnsupportedClassVersionError: org/apache/tools/ant/launch/Launcher : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.apache.tools.ant.launch.Launcher. Program will exit.
Exception in thread "main"



この記事に返信する


mirage17

リンク

2017/3/6(Mon) 08:46:47|NO.78377

分かる事だけ書いておきます。

Android開発環境(SDK)の推奨フォルダーは、
C:\android\android-sdkです。

Android SDK Manager
で、本に載っていないけど、必要なSDKは、
Android SDK Build TOOLSです。

まずは上記がちゃんと導入できているか、確認してください。
できていない場合は、ビルドに失敗すると思います。
それ以外が原因なら、回答のできる私以外の回答者の回答を待ってください。
忙しいので手短ですが、最低限重要な事を書きました。
よろしくお願いします。



zakki

リンク

2017/3/6(Mon) 12:28:44|NO.78378

> java.lang.UnsupportedClassVersionError: org/apache/tools/ant/launch/Launcher : Unsupported major.minor version 52.0

Javaが古いというエラーです。

Ant 1.10.1 を動かすには Java8 が必要だそうです。
Ant 1.9.9 を使うか JDK のアップデートを試すといいかと。



りゅうじ

リンク

2017/3/7(Tue) 23:23:30|NO.78418

お二人ともご返答ありがとうございます。
JDKをjdk-8u121-windows-i586.exeに変更したらうまくいきました!
実機へも転送もうまくいきました!

うおおお〜!自分のスマホでHSP3DISHのプログラムが動いてる!
感動してます!
mirage17さん、zakkiさん、アドバイスありがとうございました!



ONION software Copyright 1997-2023(c) All rights reserved.