Languages

Menu
Sites
Language
SDK 2.4r7 unable to create package from CLI

Hi,

I followed documentation to create and built a simple HelloWorld Native application but cannot create a package with tizen package command : "Cannot provide a package function to this project". 

When i take a look in tools/ide/ncli.log :

2016-06-30 14:19:08,190 [TRACE] Main.java(85) - Start running Tizen CLI Main class...
2016-06-30 14:19:08,194 [TRACE] Main.java(86) - Argument count:9
2016-06-30 14:19:08,210 [TRACE] PackageCLI.java(221) - Execute PackageCLI...
2016-06-30 14:19:08,211 [TRACE] PackageCLI.java(226) - getRealWorkingPath: /home/denis/workspaceTZ/rototo
2016-06-30 14:19:08,213 [TRACE] PackageCLI.java(745) - tizen-manifest.xml does not exist
2016-06-30 14:19:08,213 [TRACE] PackageCLI.java(746) - The entered path : /home/denis/workspaceTZ/rototo
2016-06-30 14:19:08,214 [ERROR] AbstractCLI.java(92) - Cannot provide a package function to this project
org.tizen.ncli.ide.exceptions.UnexpectedException: Cannot provide a package function to this project
        at org.tizen.ncli.ide.shell.PackageCLI.execute(PackageCLI.java:749)
        at org.tizen.ncli.ide.shell.AbstractCLI.execute(AbstractCLI.java:90)
        at org.tizen.ncli.ide.shell.Main.run(Main.java:141)
        at org.tizen.ncli.ide.shell.Main.main(Main.java:73)

Of course tizen-manifest.xml exist in /home/denis/workspaceTZ/rototo.

Systeme used : Debian GNU/Linux 32bit with Java(TM) SE Runtime Environment (build 1.7.0_25-b15.

Everything works fine with an IDE project, creation, build, sign and package.

 

View Selected Answer

Responses

5 Replies
Yasin Ali

Hi~,

Set the path of profiles.xml first and then package your app.

Share your CLI commands for better understanding.

Denis Bodor

Hi,

This is what i do.

Create new project :

tizen create native-project -p wearable-2.3.1 -t basic-ui -n firstapp -- /home/denis/workspaceTZ

Build :

tizen build-native --rootstrap wearable-2.3.1-device.core --configuration Debug -- /home/denis/workspaceTZ/firstapp

Create certificate (email address here with "(at)" is just to avoid forum to catch on mailto) :

tizen certificate -a MyTizen -p mypassword -c FR -s Alsace -ct Colmar -o None -u Development -n "Denis Bodor" -e name(at)domaine.com

Add profile :

tizen security-profiles add -n MyTizen -a ~/tizen-sdk-data/keystore/author/author.p12 -p mypassword

List profile to check and get path :

tizen security-profiles list
[...]
Loaded in '/home/denis/tizen-sdk-data/ide/keystore/profiles.xml'.
[...]

Set default profile path in config :

tizen cli-config -g default.profiles.path=/home/denis/tizen-sdk-data/ide/keystore/profiles.xml

Try to make package :

tizen package --type tpk --sign MyTizen -- /home/denis/workspaceTZ/firstapp
[...]
Cannot provide a package function to this project
[...]

Check in log file :

$ tail tools/ide/ncli.log

2016-07-02 08:44:15,478 [TRACE] PackageCLI.java(221) - Execute PackageCLI...
2016-07-02 08:44:15,479 [TRACE] PackageCLI.java(226) - getRealWorkingPath: /home/denis/workspaceTZ/firstapp
2016-07-02 08:44:15,481 [TRACE] PackageCLI.java(745) - tizen-manifest.xml does not exist
2016-07-02 08:44:15,481 [TRACE] PackageCLI.java(746) - The entered path : /home/denis/workspaceTZ/firstapp
2016-07-02 08:44:15,482 [ERROR] AbstractCLI.java(92) - Cannot provide a package function to this project

Did i miss something ?

Denis Bodor

Another thing.

When i strace java code when trying to make the package i get this :

13917 write(80, "2016-07-03 12:05:00,297 [TRACE] "..., 108) = 108
13917 stat64("/home/denis/workspaceTZ/firstapp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
13936 mmap2(NULL, 225280, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x6db48000
13917 stat64("/home/denis/workspaceTZ/firstapp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
13917 stat64("/home/denis/workspaceTZ/firstapp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
13917 stat64("/home/denis/workspaceTZ/firstapp/../tizen-manifest.xml", 0xb6849dcc) = -1 ENOENT (No such file or directory)
13917 write(80, "2016-07-03 12:05:00,301 [TRACE] "..., 89) = 89
13936 munmap(0x6db48000, 225280)        = 0
13917 write(80, "2016-07-03 12:05:00,302 [TRACE] "..., 107) = 107
13917 write(1, "Cannot provide a package functio"..., 50) = 50

It search for tizen-manifest.xml in parent directory (/home/denis/workspaceTZ), not in project directory.(/home/denis/workspaceTZ/firstapp).

 

Mark as answer
Denis Bodor

I've been plain stupid.

packaging command must be :

tizen package --type tpk --sign MyTizen -- /home/denis/workspaceTZ/firstapp/Debug

not 

tizen package --type tpk --sign MyTizen -- /home/denis/workspaceTZ/firstapp

I'm very sorry for the noise :(

Phil rzr

Hi Denis,

Have you figured out how to deploy to commercialized device using CLI sdk ?

tizen package -s

and then

tizen run

failed

https://wiki.tizen.org/wiki/SDK