error on build app

I can run the app in debug mode(with rhosimulator).

but failed to generate the app.

Even test with default framework:

     rhodes-setup

     rhodes app xxxx

     rake device:android:debug

error:

无标题.png

I have download the pkg from apache,and unziped to lib directory of java.

Still trigger the same error.

Anyone know why?

Possible only happened in 5.2.2, for did not trigger before update.

MengChang Xiao
Tested under NDK r9 & r10e

Tested under NDK r9 & r10e,same error。

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Joydeep Chakraborty
Hi,What is the android SDK

Hi,

What is the android SDK version and Rho version you are trying with?

1.Please try with Rho version 5.3, Re create the application and try to build.

or

2.I think this issue is being observed because of andid API level 23 and abobe.

API Differences between 22 and 23 

Please downgrade to  Android API level 21 try building the application.

Regards,

Joydeep

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


MengChang Xiao
My base env: rms 5.2.2 , NDK

My base env: rms 5.2.2 , NDK r9, SDK 23

Would you pls tell me your env?

Thank you.

//#define RHO_NO_RUBY

$app_config['extensions'] : ["coreapi", "json"]

$app_config['capabilities'] : ["calendar", "network_state", "sdcard", "hardware_acceleration"]

+++ API LEVEL of D:/androidSDK/platforms/android-19: 19

+++ API LEVEL of D:/androidSDK/platforms/android-23: 23

Use Google addon API (1): false

Using Android SDK build-tools: 23.0.1

Use Google addon API (2): false

$vendor = x_m_c

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


MengChang Xiao
Anyone know how to specify

Anyone know how to specify the android SDK & NDK in rho?

I found two place:

     1) AndroidManifest.erb -->    <uses-sdk android:minSdkVersion='<%= @minSdkVer %>' android:targetSdkVersion='21' android:maxSdkVersion='21' />

               -------> I have changed the version as you see,but rho still use V23:

                          Using Android SDK build-tools: 23.0.2

     2) build.yml --> android:   version: "5.0.1"

               --------> I changed too,

but the execute log just keeps same:

      "Using Android SDK build-tools: 23.0.2"  ------the newest version.

Where is the source to change?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Joydeep Chakraborty
Hi Xiao,For NDK you need to

Hi Xiao,

For NDK you need to specify the path of your NDK folder. We are currently supporting Android NDK version 9. Android NDK 10  has known issues with Rho and currently not supported.So please download Android NDK version 9 and specify the path for android NDK in your rhobuild.yml inside rhodes installation folder.

Specifying android SDK version is not supported till Rho 5.2.2. In 5.2.2 and below Rho will try to build with the latest SDK version found in SDK path.If you have to buid in Rho 5.2.2 and you have already installed Android SDK API level 23,you need to uninstall API level 23. In Rho we support till API level 22(Market version 5.1.1).

We have added a new feature to specify the Android SDK version to build with in Rho 5.3 and above,so that user can specify the Android SDK version to build with even if they have newer SDK versions available in Android SDK path, no need to uninstall the latest SDK. One has to specify the market version in build.yml and corresponding API level will picked and used for building Rho native app.

build.yml --> android:   version: "5.1.1"

In this case,please make sure corresponding API level is available in the Android SDK path. For example If you specify 5.1.1 as android version in build.yml,you must have corresponding API level installed in your SDK folder that is API level 22. If this API level is not installed,then again Rho will try to build with latest available API level found,and you will encounter same issue.

For your case

1.Install NDK version 9 and specify the same path in rhobuild.yml

2.Please install Android API level 22 in your android SDK.

3.Install Rho 5.3

4.Set build.yml --> android:   version: "5.1.1"

5.Build the application

That should do the trick.Please let me know if you need any other help on the same

  

Regards,

Joydeep

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


MengChang Xiao
Thank you very much!Very

Thank you very much!

Very clear explanation,why not you create this kind of training material?

Downloading,very slow from China mainland

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


MengChang Xiao
Sorry,Joydeep, still failed

Sorry,Joydeep, still failed.

1st:

the installation not completed successfully.

at the nearly end period, popup the error msg, told me something can't install on my OS(win7 32bit)

Looks like npm... module triggers this error.

I have tried on two notebooks, both triggered this error.

The IDE installed, and Node does not appear in control panel, not installed.

2nd:

I still try to compile test project.(configured as you said)

Success to run in rhosimulator.

Fail to generate app.

When I configured with 4.2.2 version SDK, rake still use 23.0.2 version, and miss some files during subsequent execution.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Joydeep Chakraborty
Hi Xiao,I also see from your

Hi Xiao,

I also see from your previous post that you have API level 19 and 23 installed in your development m/c.Is that correct?

But you have tried with 4.2.2 in build.yml for which corresponding API level is not installed in your PC. As I earlier told,if the particular API level is not found,it will take the highest version available.

Please try with setting 4.4.2 as Android version in build.yml

Regards,

Joydeep

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


MengChang Xiao
Joydeep : thank you for your

Joydeep : thank you for your help and patience.

last night, I successfully generated the app,though not as I thought.

It still use the latest build tools: 23.0.2.

That happened after I changed few configure files (1 or 2 maybe, I just looked through the directory to find out all files with "4.2.2",and changed it to "5.1.1" )

Maybe that is not the true reason, for there is no connection between them.

Now, I'm still trying, report later.

The SDK version is right, I checked.

If no other way, I'll delete all others except V4.2.2(API 17).

Thanks.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


MengChang Xiao
delete all other sdk version

delete all other sdk version except 4.2.2 API 17.

rake clean:android failed : can't find zipalign.exe.

Give up, turn to 6.0 API 23. (delete API 17,download API 23)

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


MengChang Xiao
Failed based on V6.0 API 23:1

Failed based on V6.0 API 23:

1) SDK 6.0 API 23,NDK r9;

1.png

2) env configured correctly; (path to Java/SDK/NDK);

3) rake device:android:production --trace

1.png

This error triggered before(rho 5.2.2).

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


MengChang Xiao
success based on 5.1.1 API 22

success based on 5.1.1 API 22.

I want to further test other version,  don't tell me only works for 5.1.1 .

By the way, how to confirm which version the rake is using?

this :  Using Android SDK build-tools: 22.0.1  ?

or this:  setup_ndk(D:/android-ndk-r9, 22, arm)  ?

Sometimes,  the log likes this:

     Using Android SDK build-tools: 23.0.2

     setup_ndk(D:/android-ndk-r9, 22, arm)

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Joydeep Chakraborty
Hi,Have you cleaned the

Hi,

Have you cleaned the project before you build.

Pleas do the following.

1.Run rake clean:android

2.Run rake device:android:production --trace

.

If it still does not work,can you please share the following.

1.Run gem list and send me the output

2.send build.yml and build logs of clean and production build log.

3.What are the android SDK API levels installed in your SDK? Launch SDKManager.exe and  please send the screenshot of the same.

Regards,

Joydeep

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


MengChang Xiao
Hi,Joydeep, can you explain

Hi,Joydeep, can you explain this question?

I installed 2 build tool in Android SDK : 22 & 19:

     +++ API LEVEL of D:/androidSDK/platforms/android-19: 19

     +++ API LEVEL of D:/androidSDK/platforms/android-22: 22

     Use Google addon API (1): false

     Using Android SDK build-tools: 22.0.1

     Use Google addon API (2): false

and I set 19 as target in build.yml:

     android:

            version: "4.4.2" (API 19)

but, rake still use API 22,logs:

     Using Android SDK build-tools: 22.0.1

     ...

     CMD: D:/androidSDK/build-tools/22.0.1/aapt.exe package -f -M E:/xmc/rhoworkspace/HEVdemo/...

     ...

     CMD: "C:/Program Files/Java/jdk1.7.0_45/bin/java.exe" -Xmx1024m -jar D:/androidSDK/build-tools/22.0.1/lib/dx.jar --dex....

    

if I delete the higher version, it will use the lower one,

that means highest version will always be selected.

Or, maybe I did not configure it correctly.

When I update the rho, uninstall old version first,then install 5.3.2 in a new directory.

But do not re-create the project.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Bhakta Ranjan S...
Hello Xiao,Build tools will

Hello Xiao,

Build tools will get selected always the latest one.

The version which we are mentioning in build.yml, is for platform-tools.

If you will build you application with trace command then you can see it in log, versions of platform tools available in your machine.

You can try with command

rake device:android:proiduction --trace

Note: You can add --trace to any rake command that you are using.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments