Native Extension not working!!!

Hi, wrote the codes as explained in the above link but it was giving me error. Tried many times already. The error is as below:

Server Error

Error: uninitialized constant Rho::Externalstorage
Trace:
C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/framework/rho/rho.rb:1243:in `const_missing'
C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/framework/rho/render.rb:161:in `getBinding'
C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/framework/rhoframework.rb:55:in `eval'
C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/framework/rhoframework.rb:55:in `eval_compiled_file'
C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/framework/rho/render.rb:90:in `inst_render_index'
C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/framework/rho/render.rb:63:in `renderfile'
C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/framework/rho/rho.rb:895:in `serve_index'

===========================================================

Can you please help on why I'm getting this?

Robert Galvin
Looks like you have not

Looks like you have not included the extension in your build.yml:

extensions: ["externalstorage"]


You also need to to a 'clean' build when changing settings like this:


Screen Shot 2014-11-11 at 5.10.56 PM.jpg

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Babatunde Oyeyemi
I already added the extension

I already added the extension in build.yml and always have a clean build.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kutir Mobility
Hi Babatunde,Have you tried
Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Babatunde Oyeyemi
Hi ,Yes, tried but got the

Hi ,

Yes, tried but got the errors below when I tried to build:

PWD: G:/RhodeWS/RhoMobileApplication/extensions/externalstorage/ext/platform/and

roid

rake arch:arm

cd G:/RhodeWS/RhoMobileApplication/extensions/externalstorage/ext/platform/andro

id

cd ../../..

rake aborted!

Don't know how to build task 'G:/RhodeWS/RhoMobileApplication/bin/tmp/externalst

orage/arm/Externalstorage.cpp.o'

Tasks: TOP => arch:arm => G:/RhodeWS/RhoMobileApplication/bin/target/android/deb

ug/extensions/externalstorage/armeabi/libexternalstorage.a

(See full trace by running task with --trace)

rake aborted!

Extension build failed: G:/RhodeWS/RhoMobileApplication/extensions/externalstora

ge/ext/platform/android

Tasks: TOP => run:android:device => device:android:debug => package:android => b

uild:android:all => build:android:rhobundle => build:android:extensions

(See full trace by running task with --trace)

===================================================

Please help!!!

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Babatunde Oyeyemi
Can someone help me on this

Can someone help me on this please?????

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Robert Galvin
Would be helpful if you

Would be helpful if you attached your project files.

Thanks

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Babatunde Oyeyemi
Hi ,Project files attached

Hi ,

Project files attached!

Thanks

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Babatunde Oyeyemi
Hi , were you able to find a

Hi , were you able to find a solution to extensions issues in my codes?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kutir Mobility
Hi Babatunde Oyeyemi , I

Hi Babatunde Oyeyemi , I tried to download your zip file but it will not decompress property, it might be corrupt or incomplete. Could you verify and upload again? Thanks

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Babatunde Oyeyemi
Hi , please try this newly

Hi , please try this newly attached.

Thanks for helping.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Robert Galvin
That one was able to be

That one was able to be downloaded

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Babatunde Oyeyemi
Hi and ,How was your weekend

Hi and ,

How was your weekend? Have you been able to check my codes yet? Please kindly help me out.

Thanks.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Alexey Tikhvinsky
Hi Babatunde Oyeyemi,Try to

Hi Babatunde Oyeyemi,

Try to remove extensions/externalstorage/ext/platform/android/Rakefile then clean and rebuild.

Regards,

Alexey

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Babatunde Oyeyemi
Hi ,I've removed the rakefile

Hi ,

I've removed the rakefile, clean and rebuild but still not working.

In fact, I'm currently using RhoStudio 4.0 now but still getting the same error.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Alexey Tikhvinsky
I looks I've found the

I looks I've found the problem. There is a bug in build system and it fails to build in case \r\n line endings at ext_native.files in your extension. Try to fix line endings to be just \n.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Babatunde Oyeyemi
Hi ,My ext_native.files

Hi ,

My ext_native.files doesnt have the line you mentioned.

ext/platform/android/generated/jni/Externalstorage.cpp

ext/platform/android/generated/jni/externalstorage_ruby_wrap.cpp

ext/platform/android/generated/jni/externalstorage_js_wrap.cpp

ext/platform/android/jni/Externalstorage_impl.cpp

ext/shared/generated/externalstorage_api_init.cpp

ext/shared/generated/externalstorage_js_api.cpp

ext/shared/generated/externalstorage_ruby_api.c

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Alexey Tikhvinsky
Do you know difference

Do you know difference between dos and unix line ending formats?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Babatunde Oyeyemi
No, I don't seem to get you.

No, I don't seem to get you. Can you please elaborate on what to do?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Robert Galvin
Looks like we have an issue

Looks like we have an issue since 4.1 with building extensions. I sent it over to engineering to have a look.

In the meantime, I would recommend that you download 4.0 and run it with this version.

Thanks

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kutir Mobility
Be aware that you will have

Be aware that you will have to recreate the extension with 4.0, simply trying to recompile your 4.1 project with 4.0 will not work

Thanks,

Kutir Mobility

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jon Tara
Looks like we have an issue

Looks like we have an issue since 4.1 with building extensions.


Odd, because I have not had any trouble building extensions with 5.x.


However:


- I only have an iOS extension, not Android

- It is the "old-style" 2.x extension


This might be useful information for others, and might help isolate the problem.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jon Tara
Ah, from reading other post,

Ah, from reading other post, does appear to be specific to Android. Has to do with addition of x86 Android target support. Looks like they will be on this!

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Babatunde Oyeyemi
Hi ,I've used RhoStudio 4.0,

Hi ,

I've used RhoStudio 4.0, recreated the extension from scratch but still getting same error.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments