Hi,
I encounter a problem with the Android installation at:
http://wiki.freepascal.org/Android_tutorialAll steps are ok until Deployment and the C:\Android\Projects\androidlcl\android\build_debug_apk.bat file. I modify the build_debug_apk.bat with the following paths:
REM Adjust these paths to yours
SET PATH=C:\android\android-sdk\tools;C:\android\android-sdk\build-tools\19.0.3;C:\android\android-sdk\platform-tools\;C:\Program Files (x86)\Java\jdk1.6.0_45\bin
SET APP_NAME=lcltest
SET ANDROID_HOME=C:\android\android-sdk
SET APK_SDK_PLATFORM=C:\android\android-sdk\platforms\android-8
SET APK_PROJECT_PATH=C:\android\projects\androidlcl\android
But when I execute the build_debug_apk.bat file, I get a lcltest-unsigned.apk file with 0 octet length.
The resulting file is the follwing:
symbol : class ViewGroup
location: class com.pascal.lcltest.LCLActivity.LCL_ListViewAdapter
@Override public View getView(int position, View convertView, ViewGroup pare
nt)
^
src\com\pascal\lcltest\LCLActivity.java:760: cannot find symbol
symbol : class View
location: class com.pascal.lcltest.LCLActivity.LCL_ListViewAdapter
@Override public View getView(int position, View convertView, ViewGroup pare
nt)
^
[loading java\lang\Override.class(java\lang:Override.class)]
[loading java\lang\annotation\Annotation.class(java\lang\annotation:Annotation.c
lass)]
[loading java\lang\SuppressWarnings.class(java\lang:SuppressWarnings.class)]
[loading java\lang\annotation\Target.class(java\lang\annotation:Target.class)]
[loading java\lang\annotation\ElementType.class(java\lang\annotation:ElementType
.class)]
[loading java\lang\annotation\Retention.class(java\lang\annotation:Retention.cla
ss)]
[loading java\lang\annotation\RetentionPolicy.class(java\lang\annotation:Retenti
onPolicy.class)]
[checking com.pascal.lcltest.LCLActivity]
src\com\pascal\lcltest\LCLActivity.java:38: cannot find symbol
symbol : class View
location: class com.pascal.lcltest.LCLActivity.LCLInputConnection
_lclView = (View) targetView;
^
[loading java\lang\Integer.class(java\lang:Integer.class)]
[loading java\lang\Number.class(java\lang:Number.class)]
src\com\pascal\lcltest\LCLActivity.java:55: cannot find symbol
symbol : variable Log
location: class com.pascal.lcltest.LCLActivity.LCLInputConnection
Log.v("lclproject", "LCLInputConnection.commitText =" + text + " newCursor
Position=" + Integer.toString(newCursorPosition));
^
src\com\pascal\lcltest\LCLActivity.java:52: method does not override or implemen
t a method from a supertype
@Override public boolean commitText(CharSequence text, int newCursorPosition
)
^
src\com\pascal\lcltest\LCLActivity.java:69: cannot find symbol
symbol : variable Log
location: class com.pascal.lcltest.LCLActivity.LCLInputConnection
Log.v("lclproject", "LCLInputConnection.deleteSurroundingText left=" + Int
eger.toString(leftLength) + " right=" + Integer.toString(rightLength));
^
src\com\pascal\lcltest\LCLActivity.java:75: cannot find symbol
symbol : variable KeyEvent
location: class com.pascal.lcltest.LCLActivity.LCLInputConnection
eventResult = LCLOnKey(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL, null,
(char) 0);
^
src\com\pascal\lcltest\LCLActivity.java:75: cannot find symbol
symbol : variable KeyEvent
location: class com.pascal.lcltest.LCLActivity.LCLInputConnection
eventResult = LCLOnKey(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL, null,
(char) 0);
^
src\com\pascal\lcltest\LCLActivity.java:77: cannot find symbol
symbol : variable KeyEvent
location: class com.pascal.lcltest.LCLActivity.LCLInputConnection
eventResult = LCLOnKey(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DEL, null, (
char) 0);
^
src\com\pascal\lcltest\LCLActivity.java:77: cannot find symbol
symbol : variable KeyEvent
location: class com.pascal.lcltest.LCLActivity.LCLInputConnection
eventResult = LCLOnKey(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DEL, null, (
char) 0);
^
src\com\pascal\lcltest\LCLActivity.java:91: cannot find symbol
symbol : variable super
location: class com.pascal.lcltest.LCLActivity.LCLInputConnection
return super.deleteSurroundingText(leftLength, rightLength);
^
src\com\pascal\lcltest\LCLActivity.java:67: method does not override or implemen
t a method from a supertype
@Override public boolean deleteSurroundingText(int leftLength, int rightLeng
th)
^
src\com\pascal\lcltest\LCLActivity.java:106: cannot find symbol
symbol : method setWillNotDraw(boolean)
location: class com.pascal.lcltest.LCLActivity.LCLSurface
setWillNotDraw(false);
^
src\com\pascal\lcltest\LCLActivity.java:108: cannot find symbol
symbol : method setWillNotCacheDrawing(boolean)
location: class com.pascal.lcltest.LCLActivity.LCLSurface
setWillNotCacheDrawing(true);
^
src\com\pascal\lcltest\LCLActivity.java:110: cannot find symbol
symbol : method requestFocus()
location: class com.pascal.lcltest.LCLActivity.LCLSurface
requestFocus();
^
src\com\pascal\lcltest\LCLActivity.java:111: cannot find symbol
symbol : method setFocusableInTouchMode(boolean)
location: class com.pascal.lcltest.LCLActivity.LCLSurface
setFocusableInTouchMode(true);
^
src\com\pascal\lcltest\LCLActivity.java:117: cannot find symbol
symbol : method getWidth()
location: class com.pascal.lcltest.LCLActivity.LCLSurface
int lWidth = getWidth();
^
src\com\pascal\lcltest\LCLActivity.java:118: cannot find symbol
symbol : method getHeight()
location: class com.pascal.lcltest.LCLActivity.LCLSurface
int lHeight = getHeight();
^
src\com\pascal\lcltest\LCLActivity.java:136: package Bitmap does not exist
canvasbitmap = Bitmap.createBitmap(lWidth, lHeight, Bitmap.Config.ARGB_8
888);
^
src\com\pascal\lcltest\LCLActivity.java:136: cannot find symbol
symbol : variable Bitmap
location: class com.pascal.lcltest.LCLActivity.LCLSurface
canvasbitmap = Bitmap.createBitmap(lWidth, lHeight, Bitmap.Config.ARGB_8
888);
^
src\com\pascal\lcltest\LCLActivity.java:114: method does not override or impleme
nt a method from a supertype
@Override protected void onDraw(Canvas canvas)
^
src\com\pascal\lcltest\LCLActivity.java:145: cannot find symbol
symbol : variable super
location: class com.pascal.lcltest.LCLActivity.LCLSurface
super.onKeyDown(keyCode, event);
^
src\com\pascal\lcltest\LCLActivity.java:146: cannot find symbol
symbol : variable KeyEvent
location: class com.pascal.lcltest.LCLActivity.LCLSurface
int eventResult = LCLOnKey(KeyEvent.ACTION_DOWN, keyCode, event, (char) 0)
;
^
src\com\pascal\lcltest\LCLActivity.java:142: method does not override or impleme
nt a method from a supertype
@Override public boolean onKeyDown (int keyCode, KeyEvent event)
^
src\com\pascal\lcltest\LCLActivity.java:154: cannot find symbol
symbol : variable KeyEvent
location: class com.pascal.lcltest.LCLActivity.LCLSurface
int eventResult = LCLOnKey(KeyEvent.ACTION_UP, keyCode, event, event.getUn
icodeChar());
^
src\com\pascal\lcltest\LCLActivity.java:158: cannot find symbol
symbol : variable super
location: class com.pascal.lcltest.LCLActivity.LCLSurface
super.onKeyUp(keyCode, event);
^
src\com\pascal\lcltest\LCLActivity.java:162: cannot find symbol
symbol : method finish()
location: class com.pascal.lcltest.LCLActivity.LCLSurface
finish();
^
src\com\pascal\lcltest\LCLActivity.java:171: cannot find symbol
symbol : variable KeyEvent
location: class com.pascal.lcltest.LCLActivity.LCLSurface
if (keyCode == KeyEvent.KEYCODE_MENU)
^
src\com\pascal\lcltest\LCLActivity.java:174: cannot find symbol
symbol : method closeOptionsMenu()
location: class com.pascal.lcltest.LCLActivity.LCLSurface
if (flagIsMenuOpen) closeOptionsMenu();
^
src\com\pascal\lcltest\LCLActivity.java:175: cannot find symbol
symbol : method openOptionsMenu()
location: class com.pascal.lcltest.LCLActivity.LCLSurface
else openOptionsMenu();
^
src\com\pascal\lcltest\LCLActivity.java:151: method does not override or impleme
nt a method from a supertype
@Override public boolean onKeyUp (int keyCode, KeyEvent event)
^
src\com\pascal\lcltest\LCLActivity.java:185: cannot find symbol
symbol : method postInvalidate()
location: class com.pascal.lcltest.LCLActivity.LCLSurface
if ((eventResult | 1) != 0) postInvalidate();
^
src\com\pascal\lcltest\LCLActivity.java:182: method does not override or impleme
nt a method from a supertype
@Override public boolean onTouchEvent (MotionEvent event)
^
src\com\pascal\lcltest\LCLActivity.java:193: cannot find symbol
symbol : variable InputType
location: class com.pascal.lcltest.LCLActivity.LCLSurface
outAttrs.inputType = InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS;
^
src\com\pascal\lcltest\LCLActivity.java:194: cannot find symbol
symbol : variable EditorInfo
location: class com.pascal.lcltest.LCLActivity.LCLSurface
outAttrs.imeOptions = EditorInfo.IME_ACTION_DONE;
^
src\com\pascal\lcltest\LCLActivity.java:189: method does not override or impleme
nt a method from a supertype
@Override public InputConnection onCreateInputConnection(EditorInfo outAttrs
)
^
src\com\pascal\lcltest\LCLActivity.java:198: method does not override or impleme
nt a method from a supertype
@Override public boolean onCheckIsTextEditor()
^
src\com\pascal\lcltest\LCLActivity.java:220: operator != cannot be applied to co
m.pascal.lcltest.LCLActivity.LCLSurface,<nulltype>
if (((eventResult & 1) != 0) && (lclsurface != null)) lclsurface.postInvalid
ate();
^
src\com\pascal\lcltest\LCLActivity.java:220: cannot find symbol
symbol : method postInvalidate()
location: class com.pascal.lcltest.LCLActivity.LCLSurface
if (((eventResult & 1) != 0) && (lclsurface != null)) lclsurface.postInvalid
ate();
^
src\com\pascal\lcltest\LCLActivity.java:231: cannot find symbol
symbol : variable super
location: class com.pascal.lcltest.LCLActivity
super.onCreate(savedInstanceState);
^
src\com\pascal\lcltest\LCLActivity.java:234: cannot find symbol
symbol : method setContentView(com.pascal.lcltest.LCLActivity.LCLSurface)
location: class com.pascal.lcltest.LCLActivity
setContentView(lclsurface);
^
src\com\pascal\lcltest\LCLActivity.java:235: cannot find symbol
symbol : method postInvalidate()
location: class com.pascal.lcltest.LCLActivity.LCLSurface
lclsurface.postInvalidate();
^
src\com\pascal\lcltest\LCLActivity.java:238: cannot find symbol
symbol : method getWidth()
location: class com.pascal.lcltest.LCLActivity.LCLSurface
lclformwidth = lclsurface.getWidth();
^
src\com\pascal\lcltest\LCLActivity.java:239: cannot find symbol
symbol : method getHeight()
location: class com.pascal.lcltest.LCLActivity.LCLSurface
lclformheight = lclsurface.getHeight();
^
src\com\pascal\lcltest\LCLActivity.java:242: cannot find symbol
symbol : class DisplayMetrics
location: class com.pascal.lcltest.LCLActivity
DisplayMetrics metrics = new DisplayMetrics();
^
src\com\pascal\lcltest\LCLActivity.java:242: cannot find symbol
symbol : class DisplayMetrics
location: class com.pascal.lcltest.LCLActivity
DisplayMetrics metrics = new DisplayMetrics();
^
[loading java\util\Collection.class(java\util:Collection.class)]
[loading java\lang\Iterable.class(java\lang:Iterable.class)]
[loading java\util\ArrayList.class(java\util:ArrayList.class)]
[loading java\lang\Exception.class(java\lang:Exception.class)]
[loading java\lang\Throwable.class(java\lang:Throwable.class)]
[loading java\util\AbstractList.class(java\util:AbstractList.class)]
[loading java\util\AbstractCollection.class(java\util:AbstractCollection.class)]
[loading java\lang\Comparable.class(java\lang:Comparable.class)]
[loading java\util\Map$Entry.class(java\util:Map$Entry.class)]
[loading java\util\Set.class(java\util:Set.class)]
[loading java\lang\CloneNotSupportedException.class(java\lang:CloneNotSupportedE
xception.class)]
[loading java\lang\System.class(java\lang:System.class)]
[loading java\lang\UnsatisfiedLinkError.class(java\lang:UnsatisfiedLinkError.cla
ss)]
[loading java\lang\LinkageError.class(java\lang:LinkageError.class)]
[loading java\lang\Error.class(java\lang:Error.class)]
[total 605ms]
Note: src\com\pascal\lcltest\LCLActivity.java uses unchecked or unsafe operation
s.
Note: Recompile with -Xlint:unchecked for details.
100 errors
C:\android\projects\androidlcl\android>REM DX to convert the java bytecode to da
lvik bytecode
C:\android\projects\androidlcl\android>call dx --dex --verbose --output=C:\andro
id\projects\androidlcl\android\bin\classes.dex C:\android\projects\androidlcl\an
droid\bin\classes
no classfiles specified
C:\android\projects\androidlcl\android>REM Now build the unsigned APK
C:\android\projects\androidlcl\android>del C:\android\projects\androidlcl\androi
d\bin\lcltest-unsigned.apk
C:\android\projects\androidlcl\android>call apkbuilder C:\android\projects\andro
idlcl\android\bin\lcltest-unsigned.apk -v -u -z C:\android\projects\androidlcl\a
ndroid\bin\lcltest.ap_ -f C:\android\projects\androidlcl\android\bin\classes.dex
THIS TOOL IS DEPRECATED. See --help for more information.
java.io.FileNotFoundException: C:\android\projects\androidlcl\android\bin\lcltes
t.ap_ does not exist
Impossible de trouver C:\android\projects\androidlcl\android\bin\lcltest-unalign
ed.apk
jarsigner: unable to open jar file: bin\lcltest-unsigned.apk
Unable to open 'bin\lcltest-unaligned.apk' as zip archive
Appuyez sur une touche pour continuer...
Any help is appreciated. Thanks in advance.