HelloCompute: where is the reflected layer? - eclipse

New to Android. I'm trying to build the HelloCompute sample code for API 17 with ADT v22.0.1 under Windows 7. I do File:New Project:Android Sample Project, and select HelloCompute. In the Package Explorer I see HelloCompute.java and mono.rs in src under com.example.android.rs.hellocompute. However, I don't see any reflected layer code under gen, and I get the error "ScriptC_mono cannot be resolved to a type". I have tried re-installing eclipse / adt, and re-installing the sample code.
Is there some manual step I need to perform to generate the reflected layer?
Thanks.

I ran into a similar problem.
I got around it by running llvm-rs-cc on mono.rs and generating the ScriptC_mono.java file. Eclipse then picks up this source and compiles everything successfully.
I do not know yet whether is there a way of telling eclipse to do it automatically.

The latest ADT does have a problem in generating RenderScript code as part of the build process, so you need to do this step manually right now (or look at other threads suggesting workarounds). Hopefully the upcoming ADT will actually fix this issue so that everything gets created automatically.

Had the same problem.
Win 7 64bit.
Eclipse 4.2.2.
Upgraded to:
SDK Tools: 22.0.5.
Platform-tools: 18.0.1.
Build-tols: 18.0.1.
Problem solved.
Renderscript compilation was broken in ADT 22.0.1. Fixed for non-Windows platforms on 22.0.4. Fixed for Windows platform on 22.0.5.

Related

Getting "Error: Failed to connect to OmniSharp"

I'm trying to get VSCode working with my Unity projects, and every time I select the Project icon (the little fire at the bottom) I get the following error:
Error: Failed to connect to OmniSharp
Is anyone else getting this?
You need to download the most recent version of "mono". Open up terminal and pass in brew install mono. Then "Pick a project" and select the ..-csharp.sln file and you should be up and running.
Ok, made some progress and gotten a few Unity projects working. It seems that you need some prerequisites installed, a clean up of your Unity project folder, and possibly some hand editing of your .sln and .csproj files.
I posted a (possibly) better answer over on Reddit. Hope that's not breaking stack etiquitte.
http://www.reddit.com/r/Unity3D/comments/34d6gc/visual_studio_for_mac_help_us_vote_for_unity/
i get this on windows when my project directory has a space in it
i removed the space and removed the error
i expect it will be fixed soom
I have a completely different answer: it's the runtime that VSCode is using. It doesn't match up with what it thinks it needs. I have to remember that we're still in beta and that things are changing rapidly. I had my dnvm running beta 7, but VSCode (and OmniSharp, by extension) is looking for beta 6, so it was failing. I updated my runtime using this this post as a clue. Now I have VSCode 0.7.0 using the beta 6 runtime. I have no idea how to tell what it's looking for...I just guessed based on when they were both released. HTH

Adding Native support to gstreamer tutorial won't finish

I'm following this:
http://docs.gstreamer.com/display/GstSDK/Installing+for+Android+development
I'm using the Windows x86 ADT bundle, the Windows x86 r9d NDK, and the Gstreamer SDK linked to in the guide.
I was able to get the first tutorial to add native support, build, and run. Then I tried the 3rd tutorial, and Eclipse becomes unresponsive. Same thing happened with the 2nd tutorial. I left it to do it over the weekend in case it just took a long time. When I change anything for another attempt I delete the tutorial folder completely and use a fresh copy from the zip file. I have also remove the ADT bundle completely and started over from scratch.
If I cancel, I have the expected build errors of missing import com.gstreamer.GStreamer;
The GSTREAMER_SDK_ROOT_ANDROID value is set to C:/gstreamer
The NDK Location is C:\android-ndk-r8d
I switched to using r8d as recommended in: Adding Gstreamer support to an android NDK project
One comment also suggests adding to the gstreamer.mk file:
ifndef SYSROOT
SYSROOT := $(NDK_PLATFORMS_ROOT)/$(TARGET_PLATFORM)/arch-$(TARGET_ARCH)
endif
I attempted this but there is a gstreamer_prebuilt.mk file it may be using instead.
My only clue is that Tutorial 1 does not use gstreamer plugins and the tutorials that do not work use plugins.
Thank you for any help you can give.
Edit: I tried using android-ndk-r7c also.
Then I deleted the ADT bundle and tried going the "Use an existing IDE" route, same result.
I'm going to try a different machine, and also see if I can compile it without eclipse, but I would love to hear any guess on what's going on.
Edit2: I watched a youtube video of someone setting this up (as far as I can tell he adds the NDK manually adding a build program and pointing to the ndk-build.cmd file):
https://www.youtube.com/watch?v=nKfAELFdf9A
This seemed to work but I was still missing import com.gstreamer.GStreamer; so I closed the tutorial 2 project, built and ran tutorial 1, opened tutorial 2 again, cleaned, built, and it ran.
Problem solved.
I watched a youtube video of someone setting this up (as far as I can tell he adds the NDK manually adding a build program and pointing to the ndk-build.cmd file):
https://www.youtube.com/watch?v=nKfAELFdf9A
This seemed to work but I was still missing import com.gstreamer.GStreamer; so I closed the tutorial 2 project, built and ran tutorial 1, opened tutorial 2 again, cleaned, built, and it ran.
Problem solved.

Description error in Eclipse IDE for BlackBerry app generation

I am creating a HelloWorld program in Eclipse IDE for BlackBerry.
But I am getting following error :
Description Resource Path Location Type
InvalidRegex: Pattern value '([a-zA-Z_]{1,63}[\s-a-zA-Z_0-9.]{0,63}[;]?)*' is not a valid regular expression. The reported error was: ''-' is an invalid character range. Write '-'.' at column '{2}'. BlackBerry_App_Descriptor.xml /HelloWorld Unknown XML Problem
I tried uninstalling jdk 7.0 and instaling jdk 6.0 and trying, as suggested by few ppl.
But it didnt work for me. Can anyone please provide a solution for this.
Thanks in advance !
Can be fixed by switching Eclipse default JRE from 7 to 6.
in Window->Preferences->Java
Or you can try by deleting the BlackBerry_App_Descriptor.xml and then it got created again.
If that doesn't help
The problem is with Java 1.7, which the plugin doesn't currently support. You will need to use Java 1.6 32bit for development with the Eclipse plugin.
First uninstall jdk7. Then download and install jdk6.
Next time do some research before asking. The solution was rigth there. You will become a better programmer if you try and read before waiting for someone's answer

Type Conversion to Dalvik format failed: Unable to execute dex: wrapper was not properly loaded first

I have had all sorts of bizarre errors, like the one in the title, happen when I am using the Android SDK and AVD Manager with Eclipse. Generally I just unplug the phone and plug it back in or close and reopen Eclipse but it is frustrating. Apparently Conversion to Dalvik format failed: Unable to execute dex: wrapper was not properly loaded first doesn't allow me to compile my app, i think it is because I was trying to run the emulator with some suggestions from emulator is so slow to no avail. thought i should add im running eclipse 3.5.2 on Ubuntu 11.04
Just restart the eclipse and run the project. The error arises while installing a new target version. After completion of the installation it will get fix automatically. Else restart eclipse.
I met with the same error on my Macbook. I tried one of the methods explained at this link http://techmologies.blogspot.com/2009/05/conversion-to-dalvik-format-failed-with_06.html and solved the problem.
Put the following 2 lines in the eclipse.ini file:
-vm
C:\Program Files\Java\jdk1.6.0_07\bin\javaw.exe
Please modify the 2nd line according to the actual situation.
If you have upgraded your SDK, and if you have not updated ADT plugin it will show this error. Please check it once by updating ADT plugin
I made a new installation of Eclipse in different folder(with the same SDK folder) and imported the code to the workspace & it started to work again.

Netbeans compile error, why does it mean?

I finished a Netbeans project a few months ago, it was successfully done, finished. But the strange thing is today I happen to look into it and recompiled it, haven't changed anything, but got the following error, I vaguely remember I encountered similar situations before, just recompile and it will be fine, but not this time, I recompiled a few times, same error, restarted the PC, and recompiled again, same error :
build-impl.xml:501: copylibs doesn't support the "indexMetaInf" attribute
I never touched this file and have no idea why it worked fine, but failed this time, what's wrong and what's the fix ?
It seems that the problem is in version of Ant and new Ant attribute indexMetaInf.
I have the same problem and think it'll be worth to explain how I've got it.
How to obtain the problem:
I use NetBeans 6.8.
Recently I installed NetBeans 7.0. Just for acquaintance with new features.
I accepted to use old NB6.8 configuration, when NB7.0 asked me on the first launch.
That was mistake!
So. I started NB7.0 and my good old NB6.8 projects were there, in the projects list.
The problem is that NB7.0 not only imported my old projects in its projects list; but also
changed build-impl.xml of those projects.
And when I opened my projects in NB6.8 and tryed to compile them, there was that error with "indexMetaInf".
The essence of the problem:
In NB6.8 the Ant 1.7.1 is used, by default. And it seems that attribute "indexMetaInf" is only supported by
latest versions of Ant (maybe starting with 1.8.x). That new version of Ant was installed with NB7.0 and is used by NB7.0 only.
NB6.8 doesn't see it.
How to fix the problem:
I updated build-impl.xml file from subversion and it fixed the problem.
In my previous version of build-impl.xml there was no indexMetaInf.
Had the same problem, fixed it by copying the file org-netbeans-modules-java-j2seproject-copylibstask.jar from [netbeans]\java\ant\extra into the directory myProject\lib\CopyLibs
Strange thing happened again, this time good. I had a backup DVD, from a few weeks ago, I copied the project back, now it's compiling fine again, seems to me the project somehow got corrupted, I did a C: drive defragmentation last week, could it somehow moved some files around and messed up a bit ? Anyhow, not a problem now.
What platform are you using? I've had some odd errors like that on Unix due to trying to compile the project from the command line and having a older version of ant in my path.