Log in or register to post comments

Export to eclipse "problem? "

April 18, 2013 - 9:05am #1

Hello everyone.

 

I am currently using unity 4 with android. and i have seen to run into some problem.

I have made this small app with vuforia AR (a little house). when i build it within Unity it works fine.

When i export it to Eclipse. i get no errors.

then when i build it with Eclipse everything starts up, but i get NO TRACKING!

 

I have been trying to figure out why, so i redid the above multiple times without alternating anything in eclipse. The same result.

So my questions are: Does unity chance something when you build/export to eclipse?

Does one need to alter something in Eclipse? to get the unity /vuforia project to work?

Does anybody have the same issue?

 

Thanks in advance!

Export to eclipse "problem? "

May 6, 2013 - 5:05am #12

 

BTW. Your guide works now!!! (before i skipped the first part, cause i thought the export to eclipse would do that)!

Thanks for your help!

Glad to hear that ! you're welcome.

 

Export to eclipse "problem? "

May 6, 2013 - 4:42am #11

So i am still experimenting, with the guide.

But this makes me wonder about the following;

 

- In Unity you can select "export to eclipse" under the android settings.

So my question would be : Why isn't this working?

The guide makes me feel like i am rebuilding the whole workspace, so it works in eclipse (basicly a workaround for the export function)

wouldn't it be more logical to have vuforia work with the export function?

It is not a complaint, but it would make more sense.

BTW. Your guide works now!!! (before i skipped the first part, cause i thought the export to eclipse would do that)!

Thanks for your help!

Export to eclipse "problem? "

May 2, 2013 - 8:16am #10

Hi, you can try to isolate the issue;

have you already tried the procedure starting from a fresh new ImageTargets sample (i.e. not your own app) and see if it works ?

That would be a good experiment to do.

 

 

Export to eclipse "problem? "

May 2, 2013 - 6:44am #9

Well i have tried it 6  times now.

But i keep getting the error of;

 java.lang.RuntimeException: Unable to start activity ComponentInfo{client.demo1/client.demo1.Demo1Activity}: android.util.AndroidRuntimeException: requestFeature() must be called before adding content.

WHen i export from Unity. There is no error and the app just starts. The problem is that it doesn't track the tracking image (meaning it doens't work)

As soon as i change the things from the step plan. i start to get the error.

I have fidled around and altered all the java files. xxxActivity, xxxNativeActivity, xxxProxyActivity with the same steps, but that doesn't help either.

Can you maybe explain why i have to change something in the files, while when i export directly from unity it works fine?

Or can i upload my scene so you can have a go?

 

Thanks in advance!

 

Export to eclipse "problem? "

May 2, 2013 - 4:22am #8

Hi, setContentView(playerView) should be removed (actually I don't see eaxcatly whu you need that line...)

The rest of the magic is done by setting the AndroidManifest.xml in the way which is explained in that tutorial; that's a key part, and in my experience it's the typical source of problems, so check carefully the part related to the AndroidManifest (essentially, all the steps in the tutorial must be executed exactly as it is explained, even any small difference will likely not make it work).

 

Export to eclipse "problem? "

May 2, 2013 - 4:06am #7

Hello AlessndroB

I am still trying to get it to work.

But if i follow the steps in the guide, i get the following error

05-02 13:01:36.760: E/AndroidRuntime(21334): java.lang.RuntimeException: Unable to start activity ComponentInfo{client.demo1/client.demo1.Demo1Activity}: android.util.AndroidRuntimeException: requestFeature() must be called before adding content
 

The difference in the steps and my workspace is;

3. Remove the line "setContentView(R.layout.main)."

I only have "setContentView(playerView);"

and turning it off still produces this error.

What i don't understand is that when i export directly from Unity everything works fine. So what is changed?

Any other ideas?

Thanks in advance

 

Export to eclipse "problem? "

April 19, 2013 - 11:46am #6

Hi, it was posted not long ago. 

You can also try different approaches (and if you find them, we are also interested in hearing the solution),

but if your goal is to export your Unity project to Eclipse and then work in Eclipse, that tutorial surely works (many developers have tried it succesfully, also on Unity 4).

 

 

Export to eclipse "problem? "

April 19, 2013 - 10:16am #5

I wonder when that doc was posted...

Export to eclipse "problem? "

April 19, 2013 - 4:31am #4

Hi, I tried the apprach explained in the Tutorial with Unity 4.1 and it works fine.

You can ignore the last part (adding custom views) of the tutorial, but everything else should be Ok.

 

Export to eclipse "problem? "

April 19, 2013 - 3:51am #3

HI AlessandroB.

Thank you for your reply.

I already found that tutorial and i tried it. But the "Integration steps " Don't really apply anymore i think, since Unity exports directly into a project file now (no more APK) (I am using unity 4)

after that i tried to do the "Code changes"

But this didn't give any positive result (basicly i got the same behaviour, or worse).

The last steps of the tutorial i didn't do, since this didn't adress my problem |"Adding your custom Android views/layouts"

So you have any other suggestions?

 

Thanks in advance

Export to eclipse "problem? "

April 18, 2013 - 9:35am #2

Hi,

have a look at this tutorial:

https://developer.vuforia.com/resources/dev-guide/extending-unity-android-activity-and-adding-custom-views-eclipse

it explains you how to build the Unity project in Eclipse (and also how to add custom view and custom code to it)

 

Log in or register to post comments