Recent

Author Topic: Help with LaztoApk  (Read 1584 times)

magleft

  • New Member
  • *
  • Posts: 44
Help with LaztoApk
« on: June 03, 2021, 07:09:40 pm »
Hello.
I can' t buld a example from lamw example projects and i get following messages:
What is the problem? Must be doing anything?



Messages, Hints: 2
Verbose: Selected chip architecture: armeabi
Verbose: Taking libraries from folder: c:\Adt32\eclipse\workspace\AppSqliteDemo1\libs\armeabi
Verbose: Found library: libcontrols.so
Note: Duplicate unit "controls" in "controls", orphaned ppu "c:\Adt32\eclipse\workspace\AppSqliteDemo1\obj\controls\controls.o"
Note: Duplicate unit "controls" in "LCLBase 2.0.0.4", ppu="c:\laztoapk\downloads\laz4android2.0.0\lcl\units\arm-android\controls.ppu", source="c:\laztoapk\downloads\laz4android2.0.0\lcl\controls.pp"
Compile Project, OS: android, CPU: arm, Target: c:\Adt32\eclipse\workspace\AppSqliteDemo1\libs\armeabi\libcontrols.so: Success
Building APK (Ant)... : Exit code 1, Errors: 101
Panic:    [delete] Deleting directory c:\Adt32\eclipse\workspace\AppSqliteDemo1\bin
Panic:    [delete] Deleting directory c:\Adt32\eclipse\workspace\AppSqliteDemo1\gen
Panic: [getlibpath] Library dependencies:
Panic: [getlibpath] No Libraries
Panic:    [subant] No sub-builds to iterate on
Panic:
Panic: -set-mode-check:
Panic:
Panic: -set-debug-files:
Panic:
Panic: -check-env:
Panic:  [checkenv] Android SDK Tools Revision 25.2.5
Panic:  [checkenv] Installed at c:\laztoapk\downloads\android-sdk-windows
Panic:
Panic: -setup:
Panic:      [echo] Project Name: AppSqliteDemo1
Panic:   [gettype] Project Type: Application
Panic:
Panic: -set-debug-mode:
Panic:
Panic: -debug-obfuscation-check:
Panic:
Panic: -pre-build:
Panic:
Panic: -build-setup:
Panic: [getbuildtools] Using latest Build Tools: 29.0.3
Panic:      [echo] Resolving Build Target for AppSqliteDemo1...
Panic: [gettarget] Project Target:   Android 4.0
Panic: [gettarget] API level:        14
Panic:      [echo] ----------
Panic:      [echo] Creating output directories if needed...
Panic:     [mkdir] Created dir: c:\Adt32\eclipse\workspace\AppSqliteDemo1\bin
Panic:     [mkdir] Created dir: c:\Adt32\eclipse\workspace\AppSqliteDemo1\bin\res
Panic:     [mkdir] Created dir: c:\Adt32\eclipse\workspace\AppSqliteDemo1\bin\rsObj
Panic:     [mkdir] Created dir: c:\Adt32\eclipse\workspace\AppSqliteDemo1\bin\rsLibs
Panic:     [mkdir] Created dir: c:\Adt32\eclipse\workspace\AppSqliteDemo1\gen
Panic:     [mkdir] Created dir: c:\Adt32\eclipse\workspace\AppSqliteDemo1\bin\classes
Panic:     [mkdir] Created dir: c:\Adt32\eclipse\workspace\AppSqliteDemo1\bin\dexedLibs
Panic:      [echo] ----------
Panic:      [echo] Resolving Dependencies for AppSqliteDemo1...
Panic: [dependency] Ordered libraries:
Panic: [dependency]
Panic: [dependency] ------------------
Panic: [dependency] API<=15: Adding annotations.jar to the classpath.
Panic:      [echo] ----------
Panic:      [echo] Building Libraries with 'debug'...
Panic:    [subant] No sub-builds to iterate on
Panic:
Panic: -code-gen:
Panic: [mergemanifest] Merging AndroidManifest files into one.
Panic: [mergemanifest] Manifest merger disabled. Using project manifest only.
Panic:      [echo] Handling aidl files...
Panic:      [aidl] No AIDL files to compile.
Panic:      [echo] ----------
Panic:      [echo] Handling RenderScript files...
Panic:      [echo] ----------
Panic:      [echo] Handling Resources...
Panic:      [aapt] Generating resource IDs...
Panic:      [echo] ----------
Panic:      [echo] Handling BuildConfig class...
Panic: [buildconfig] Generating BuildConfig class.
Panic:
Panic: -pre-compile:
Panic:
Panic: -compile:
Panic:     [javac] Compiling 14 source files to c:\Adt32\eclipse\workspace\AppSqliteDemo1\bin\classes
Panic:     [javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
Panic:     [javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
Panic:     [javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
Panic:     [javac] c:\Adt32\eclipse\workspace\AppSqliteDemo1\src\com\example\appsqlitedemo1\android-14\Controls.java:53: error: cannot find symbol
Panic:     [javac] import android.provider.DocumentsContract;
Panic:     [javac]                        ^
Panic:     [javac]   symbol:   class DocumentsContract
Panic:     [javac]   location: package android.provider
Panic:     [javac] c:\Adt32\eclipse\workspace\AppSqliteDemo1\src\com\example\appsqlitedemo1\android-14\Controls.java:541: error: cannot find symbol
Panic:     [javac]       boolean isScreenAwake = (Build.VERSION.SDK_INT < 20 ? powerManager.isScreenOn() : powerManager.isInteractive());
Panic:     [javac]                                                                                                     ^
Panic:     [javac]   symbol:   method isInteractive()
Panic:     [javac]   location: variable powerManager of type PowerManager
Panic:     [javac] c:\Adt32\eclipse\workspace\AppSqliteDemo1\src\com\example\appsqlitedemo1\android-14\jCommons.java:535: error: cannot find symbol
Panic:     [javac]                controls.activity.getWindow().setNavigationBarColor(color);                        
Panic:     [javac]                                             ^
Panic:     [javac]   symbol:   method setNavigationBarColor(int)
Panic:     [javac]   location: class Window
Panic:     [javac] c:\Adt32\eclipse\workspace\AppSqliteDemo1\src\com\example\appsqlitedemo1\android-14\jCommons.java:543: error: cannot find symbol
Panic:     [javac]                controls.activity.getWindow().setStatusBarColor(color);                        
Panic:     [javac]                                             ^
Panic:     [javac]   symbol:   method setStatusBarColor(int)
Panic:     [javac]   location: class Window
Panic:     [javac] c:\Adt32\eclipse\workspace\AppSqliteDemo1\src\com\example\appsqlitedemo1\android-14\jSqliteDataAccess.java:372: error: method does not override or implement a method from a supertype
Panic:     [javac]     @Override
Panic:     [javac]     ^
Panic:     [javac] 5 errors
Panic:     [javac] 3 warnings
Panic:
Panic: BUILD FAILED
Panic: c:\laztoapk\downloads\android-sdk-windows\tools\ant\build.xml:716: The following error occurred while executing this line:
Panic: c:\laztoapk\downloads\android-sdk-windows\tools\ant\build.xml:730: Compile failed; see the compiler error output for details.
Panic:
Panic: Total time: 5 seconds
Panic: tool stopped with exit code 1. Use context menu to get more information.
Exception, Errors: 1
Fatal: [Exception] Failed: Cannot build APK!
windows 10 64

lucamar

  • Hero Member
  • *****
  • Posts: 4132
Re: Help with LaztoApk
« Reply #1 on: June 03, 2021, 10:08:35 pm »
Ouch! Please, use code tags (yes, even for output, when it's purely textual) or pipe long outputs to a text file and add it as an attachement. Thanks :)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

jmpessoa

  • Hero Member
  • *****
  • Posts: 1870
Re: Help with LaztoApk
« Reply #2 on: June 03, 2021, 11:30:58 pm »
Hi, magleft!

Some hints [First, test your system!]

1) Go to lazarus menu  "Tools" --> "[LAMW]....." --->  "Paths Settings"
and confirm that everything is correct ...

2) Create a new  LAMW project :  "Project"  --- "New Project" ---> "[LAMW] GUI ....."
 
3) Build the LAMW  "libcontrols.so"  library:  "Run"  --> "Clean up and Build"

4) Connect some android device to your PC (or start some android emulador/AVD)

5) "Run"  --> "[LAMW] Build Android Apk and Run"


If you were successful then Congratulations!!! Now you can try open some LAMW demo:

1) Open a LAMW demo project
 
2) Build the LAMW  "libcontrols.so"  library:  "Run"  --> "Clean up and Build"

3) Connect some android device to your PC (or start some android emulador/AVD)

4) "Run"  --> "[LAMW] Build Android Apk and Run"
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

magleft

  • New Member
  • *
  • Posts: 44
Re: Help with LaztoApk
« Reply #3 on: June 05, 2021, 06:57:31 pm »
First of all I would like to thank you for your help. I will try your tips and I hope it works.
windows 10 64

 

TinyPortal © 2005-2018