Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

Integrating Unity and Eclipse

Discussion in 'Android' started by Linusmartensson, Dec 22, 2010.

  1. suppenhuhn

    suppenhuhn

    Joined:
    Dec 15, 2011
    Posts:
    37
    Hi!

    I'm not familiar with eclipse, but it sounds very interesting!
    How do i have to think about a "simple workflow" integrating a unity project within eclipse or whats the benefit of it ?
    • Creating 3D Content or more scenes in Unity
    • Making the Userinterface in Eclipse
    • Load the Unity3D Content by a "Press-to-Play-Button" made in Eclipse?
    • Publish the project as a android / ios app from Eclipse?

    Greetings
    Robert
     
    Last edited: Mar 3, 2012
  2. super3

    super3

    Joined:
    Nov 14, 2011
    Posts:
    10
    Gays , I am very excited .
    eclipse problem that bothers me a long time.
    I have come across most of your questions,
    I have try Unity3D3.5 、Unity3D3.4.2,Unity3D3.4.1,but only 3.4.1 can publish with Eclipse ;) Just try with 3.4.1 .
    Hope Official look...
     
  3. super3

    super3

    Joined:
    Nov 14, 2011
    Posts:
    10
    You need change the name of StagingArea;)
     
  4. NathanWarden

    NathanWarden

    Joined:
    Oct 4, 2005
    Posts:
    663
    Hey guys, I've been trying to do this all day and the app immediately crashes on me. I've tried to build both an existing project and a bare bones project and get the same results for both.

    Is this a 3.5 issue, or am I possibly doing something wrong?

    Thanks,
    Nathan
     
  5. super3

    super3

    Joined:
    Nov 14, 2011
    Posts:
    10
    Try with 3.4.1
     
  6. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    892
    Hello,

    I'm getting this error:

    Code (csharp):
    1.  
    2. D/Unity(3776): [SHA1] da39a3ee5e6b4b0d3255bfef95601890afd80709          0 bytes ~ assets/libs/armeabi-v7a/libunity.so
    3. D/Unity(3776): Mono path[0] = '/data/app/co.uk.company.app-1.apk/assets/bin/Data/Managed'
    4. D/Unity(3776): PlayerConnection::Initialize
    5. D/Unity(3776): PlayerConnection constructor
    6. E/Unity(3776): PlayerConnection config should be in the format: "listen <guid> <debugging> <waitonstartup> <startprofiler>" or "connect <ip>"
    7. E/Unity(3776):  
    8. E/Unity(3776): (Filename: Runtime/Network/PlayerCommunicator/PlayerConnection.cpp Line: 242)
    9.  
    Using unity 3.5
    Runs fine on iOS and web but doesn't work on android in eclipse. Anyone know what this error means?
     
  7. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    892
    After some testing I can confirm that 3.5 doesn't work with eclipse and 3.4.1 does.
     
  8. NathanWarden

    NathanWarden

    Joined:
    Oct 4, 2005
    Posts:
    663
    I was able to skip the whole integrate into Eclipse process that I thought I needed to do and instead went the plugin route instead and it works great... much simpler workflow too :)

    I'm sure there are some cases where you need to use the Intergrate into Eclipse method, but you can implement your own UnityPlayerActivty and your own Application class via plugin.
     
  9. TeotiGraphix

    TeotiGraphix

    Joined:
    Jan 11, 2011
    Posts:
    144
    Hi,

    I just posted about this in another thread but, 3.5 is broken (Eclipse integration, not the actual Android application).

    I was searching last week and found a paste bin entry for Unity 3.5.1RC1 that stated Eclipse Android crashing bug was fixed. So I guess we have to hold on for the 3.5.1 update to get our Eclipse dev back.

    Another note; I too ended up going the plugin route and just doing the build and run for testing, works for now! Logcat is still hooked up and really the only part that is missing is break point support.

    "I'm sure there are some cases where you need to use the Intergrate into Eclipse method, but you can implement your own UnityPlayerActivty and your own Application class via plugin. "

    This is so true, remember folks, dropping in a modified android manifest xml file in the Plugins folder is completely legal! :) What I mean is, if you want a custom Activity impl, just include it in the jar in the Plugins folder and change the MAIN LAUNCHER activity to that package and class name

    PS I am also including .so files in that Plugin folder as well, Unity knows exactly what to do with it to get the shared library loaded at runtime.

    Mike
     
  10. destiny9720

    destiny9720

    Joined:
    Aug 30, 2010
    Posts:
    2
    In my case, I solved the problem by repacking apk which eclipse produces.
    > zipalign -v 4 EclipseProduced.apk RenewPackage.apk
    you can find zipalign program in the android SDK tools directory.

    Dustin Lee
     
  11. txasti

    txasti

    Joined:
    Oct 26, 2010
    Posts:
    10
    +1000
    Thank You!!! It worked for me!!! :D
     
  12. gus512

    gus512

    Joined:
    Jan 18, 2012
    Posts:
    5
    At first try, it didn't work for me (don't know why), but now it is working.

    Thanks!

    Gus
     
    Last edited: Mar 28, 2012
  13. okado

    okado

    Joined:
    Mar 30, 2012
    Posts:
    2
    It worked for me too ! Thanks !
     
  14. txasti

    txasti

    Joined:
    Oct 26, 2010
    Posts:
    10
    Hi!

    I have problems again. I have downloaded and installed unity 3.5.1 version, and now I am experiencing the same problem: It doesn´t work. I have tried with zipalign, but still doesn`t work. :(
     
  15. mikolo

    mikolo

    Joined:
    Nov 27, 2009
    Posts:
    249
    Hi, i spend a lot of time now... and tried to compile Unity with eclipse like in the video in this post...in my case it only works with the android SDK 2.3.3! I tryed many time with new android version 4.0.3 and it did not worked! But anyway now it works fine..also with Unity 3.5.2f and the classes.jar file from this version.
     
  16. mikolo

    mikolo

    Joined:
    Nov 27, 2009
    Posts:
    249
    OK now it runs also with 4.0.3.... i think the Android Dependencies are not needed! Maybe this was my fault when first try!
     
  17. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,288
  18. inac

    inac

    Joined:
    Aug 9, 2010
    Posts:
    2
  19. tnetennba

    tnetennba

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    169
    Hi Inac,

    I updated the other guide last week using unity 3.5.2. This is the only relevant part that you need if you want a simple integration. Please however think about what you are doing and whether or not you really need to integrate with eclipse. There is a lot that you can do by simply using the AndroidJavaClass and AndroidJavaObject API's:

    With the eclipse guide removed from the docs I have updated this to go from start to end in doing this.

    First thing is to get your unity project set up and built.
    As a basic example just create a spinning cube project then build for android ( obviously ).

    The next step is to move some files around.
    Go into your project directory and you will see a Temp folder in there you will see a Staging Area folder. You need to copy that folder out with the Temp folder. It doesn't matter where to but as long as it not in the Temp folder. The reason for this is when you use the unity project in eclipse if you use the staging area in temp folder directly when unity rebuilds it changes the contents and this leads to problems with eclipse.

    Now you need to open up eclipse.

    Once open create a new android project and select create from existing source and point to the staging area folder that you created. This will give you the unity application in eclipse. I called this UnityLib for ease of reference in the future.

    Next thing to do is to make another android project in eclipse.
    The two important parts here are to make sure you have the correct API levels and the package name matches that of the package name you gave for the project in unity. I called this Unity Java for ease of reference.

    Now we need to change a bunch of settings and move some file around.

    * Right Click UnityLib and select properties. Then under android check IsLibrary, Apply, OK
    * Right Click UnityJava and select properties. Then under Java build Path there are a few things that need to be done
    * First click external jar then navigate to your unity install directory then select Data\PlaybackEngines\androidplayer\bin\classes.jar
    * Then under android you need to add the library UnityLib.

    * now move the folder and their contents under the asset folde rin UnityLIb to the asset folder in UnityJava
    * next move the AndroidManifest from the UnityLib to UnityJava

    Now you need to make some small code changes

    * in the main source file in UnityJava you need to extend from UnityPlayerActivity and not Activity.
    * if you press ctrl+shift+O after doing that it will automatically resolve the dependencies
    * next you need to remove the line of code setContentView(R.layout.main);

    And that should be it if you now run the UnityJava applicaiton for android it will build and run and you will see your unity content launched through an eclipse project.
     
  20. Raigex

    Raigex

    Joined:
    Jul 6, 2012
    Posts:
    154
    I have tried the above post and my package compiles, But I cannot start the application because i get a runtime error unable to instantiate activity caused by Class not found exception that points to the class .MainActivity which is what the new activity that was created with the UnityJava project
     
  21. dd619

    dd619

    Joined:
    Jul 31, 2012
    Posts:
    4
    @ahmed_ameen21: did you found the solution?
    i am facing the same problem as you.
     
  22. mikolo

    mikolo

    Joined:
    Nov 27, 2009
    Posts:
    249
  23. udaanparvaz

    udaanparvaz

    Joined:
    Jul 3, 2012
    Posts:
    4
    Can anybody guide me to setup a two way communication channel between the integrated unity part and the eclipse part....I need to send a string from unity to android and some integers from eclipse to unity. Any ideas or links would help. I've done the integration part for iPhone and Unity where I could send messages between the two through playerprefs of unity and NsUserDefaults of Xcode. Is there a similar setup for eclipse and Unity?
     
  24. turkert

    turkert

    Joined:
    May 4, 2012
    Posts:
    18
    I use Unity 3.5.5f3 and Android 2.3.3. No zipaling required.

    I've followed RoflHarris's tutorial and first problem was "The container 'Library Projects' references non existing library 'D:\Projects\Android\UnityLibrary\bin\unitylibrary.jar'". When I try to Build UnityLibrary I got "AndroidManifest.xml file is missing" error. I've copied that file from StagingArea folder.

    Second problem was "android:configChanges" section some Android 4 specific features. So I removed some of them and it became like
    Code (csharp):
    1. android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout"
    Third problem was "Couldn't load mono: findLibrary returned null". I've copied StagingArea\libs folder to UnityApplication\libs folder.

    Fourth problem was ".UnityEclipse.UnityApplicationActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x8". I'have modified AndroidManifest.xml file in UnityApplication so that activity section has
    Code (csharp):
    1. android:configChanges="orientation"
    feature.

    My complete AndroidManifest in UnityApplication
    Code (csharp):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    3.     package="com.OnayBilisim.UnityEclipse"
    4.     android:versionCode="1"
    5.     android:versionName="1.0" >
    6.  
    7.     <uses-sdk android:minSdkVersion="10" />
    8.  
    9.     <application
    10.         android:icon="@drawable/ic_launcher"
    11.         android:label="@string/app_name" >
    12.         <activity
    13.             android:name=".UnityApplicationActivity" android:configChanges="orientation"
    14.             android:label="@string/app_name" >
    15.             <intent-filter>
    16.                 <action android:name="android.intent.action.MAIN" />
    17.  
    18.                 <category android:name="android.intent.category.LAUNCHER" />
    19.             </intent-filter>
    20.         </activity>
    21.     </application>
    22.  
    23. </manifest>
    AndroidManifest.xml in UnityLibrary
    Code (csharp):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" package="com.OnayBilisim.UnityEclipse" android:versionName="1.0" android:versionCode="1">
    3.   <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
    4.   <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="false">
    5.     <activity android:name="com.unity3d.player.UnityPlayerProxyActivity" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout" android:screenOrientation="portrait">
    6.       <intent-filter>
    7.         <action android:name="android.intent.action.MAIN" />
    8.         <category android:name="android.intent.category.LAUNCHER" />
    9.       </intent-filter>
    10.     </activity>
    11.     <activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout" android:screenOrientation="portrait">
    12.     </activity>
    13.     <activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout" android:screenOrientation="portrait">
    14.       <meta-data android:name="android.app.lib_name" android:value="unity" />
    15.       <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
    16.     </activity>
    17.     <activity android:name="com.unity3d.player.VideoPlayer" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout" android:screenOrientation="portrait">
    18.     </activity>
    19.   </application>
    20.   <uses-feature android:glEsVersion="0x00020000" />
    21.   <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="15" />
    22. </manifest>
    I have just tried to implement a Cube in Eclipse. I don't know if it will work for QCAR, Vuforia, AdMob, Mobiclix or any other libraries and scripts.
     
    Last edited: Sep 15, 2012
  25. turkert

    turkert

    Joined:
    May 4, 2012
    Posts:
    18
  26. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    Last edited: Sep 17, 2012
  27. jdth

    jdth

    Joined:
    Sep 6, 2012
    Posts:
    5
    Hello everyone!

    I've been testing out Unity for the past couple of weeks and using the instructions to integrate Unity with Android Eclipse Project ( Linusmartensson ). Everything goes well, the app starts on my device (ASUS Tablet TF101), no errors in Eclipse project, the splash image starts on the device. However, suddenly the app is closed without showing me the unity environment.

    I've been repeating the process of integrating Unity + Eclipse almost 20 times, i really don't know why doesn't work.
    So the problem is basically: Why the app closes down suddenly without errors in eclipse?

    It is not problem of the device or incompatibility with unity, because i tried to start this apk made by unity and it works, the problem is when I extend from UnityPlayerActivity.

    Please help! Thank you very much :)

    Jud
     
  28. mel0mana23

    mel0mana23

    Joined:
    Jul 8, 2012
    Posts:
    2
    when i integrate unity and eclipse, the sound plays rapidly... someone know the solution?

    sorry my english
     
  29. BT2142

    BT2142

    Joined:
    Sep 28, 2012
    Posts:
    3

    I have exactly the same issue. Anyone knows how to fix this?



    I followed the guide, but do we need the "android dependencies" ?



    The container 'Android Dependencies' references non existing library 'C:\Users\BulleTTime\Desktop\KEP\app\testapp\Temp\StagingArea\bin\com.unity3d.player.unityplayerproxyactivity.jar'

     
    Last edited: Sep 28, 2012
  30. BT2142

    BT2142

    Joined:
    Sep 28, 2012
    Posts:
    3
    This worked for me to!


    Is there any way to automaticly do this when i run from eclipse?

    Thanks
     
  31. Parikshit Singh

    Parikshit Singh

    Joined:
    Sep 19, 2012
    Posts:
    6
    Hi i am also getting the same problem . can you please tellme how to clear it if you have already done it.
     
  32. Parikshit Singh

    Parikshit Singh

    Joined:
    Sep 19, 2012
    Posts:
    6
    I have both these files in my unityJava project in eclipse but still its not working Please tell me
     
  33. blacksh33p

    blacksh33p

    Joined:
    Oct 4, 2012
    Posts:
    2
    It turns out the way that ADT 17 handles .jar files broke this method of integrating Unity into Eclipse, causing various errors. Instead of adding classes.jar to your build path, you should just copy the classes.jar file into the lib directory of your project, and everything should work properly.
     
  34. Parikshit Singh

    Parikshit Singh

    Joined:
    Sep 19, 2012
    Posts:
    6
    First of all thanks for reply..

    It worked.

    I have followed the steps to import unity in eclipse.

    Created project from existing code and made it a library.

    Created a new project in eclipse, with same package name.

    imported classes.jar form unity.

    Moved assets from lib to main project.

    included the library project.

    All is fine.

    Now when i am running it on eclipse the class not found error is displayed.

    First i created a Mainactivity in main project but got error class com.brownsugar.TestAndroid03102012.Main Activity not found.

    Then i copied the android manifest from lib project then also i am getting error com.unity3d.player.unity3dplayerproxyactivity not found.

    I have attached the screen shots
    Please help me...
     

    Attached Files:

    Last edited: Oct 9, 2012
  35. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    Last edited: Oct 9, 2012
  36. kjuanlu

    kjuanlu

    Joined:
    Dec 4, 2011
    Posts:
    100
    I did this manually and I get a error:

    The file /data/app...../assets/bin/Data/sharedassets0.assets is corrupted! Remove it and launch unity again
    [Position out of bounds!]

    I also tryed with eclispe2unity plugin with the same error.

    Any suggestions? The project runs perfectly by hit build&Run button on Unity. And the method works if I try with an empty project.

    Regards
     
  37. netlander

    netlander

    Joined:
    Nov 22, 2011
    Posts:
    27
    Hi All,

    It seems that Unity have improved the workflow with Eclipse in 4.0.0f7 (same results in 4.0.0bx), now all you have to do is to check Create Eclipse Project from the Build Settings dialogue and export.

    That's great as it removes the ugly process of creating lib projects and all that messy stuff. The export creates one Eclipse project that you can open in Eclipse and run without much ado.

    One problem I came across is that after I export to Eclipse and work in Eclipse to add my Java code and what not, things work fine but more often than not, when I quit Unity it tends to wipe out the Eclipse project I exported earlier.

    Now I think that's a bug, Unity have remove all Eclipse integration documents from their site and we are left with a very promising but half working integration workflow.

    My question is, did anyone out here come across the same behaviour? And what did you do to mitigate the problem?

    Cheers
    Paul
     
  38. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    592
    If you think it's a bug you should definitely report it (menu ; Report A Bug) and attach a repro project / explain how we can reproduce it.

    Thanks!
     
  39. ant001

    ant001

    Joined:
    Dec 15, 2010
    Posts:
    116
    netlander, when i close Unity4 the project stays.

    Problem i'm having is trying to create a simple plugin using AndroidJavaObject and AndroidJavaClass, i import the exported project within Eclipse, create a new class within 'src':
    Code (csharp):
    1.  
    2. package com.ant.mobile;
    3. import android.util.Log;
    4.  
    5. public class JAUnity {
    6.     public static JAUnity m_instance;
    7.     public static JAUnity instance() {
    8.  
    9.         if(m_instance == null) {
    10.             m_instance = new JAUnity();
    11.         }
    12.         return m_instance;
    13.     }
    14.  
    15.     private JAUnity() { }
    16.  
    17.     public void doit() {
    18.         Log.w("JAUnity", "doit");
    19.     }
    20. }
    21.  
    22.  
    Then have my C# call across to it:
    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4. using System.IO;
    5.  
    6. public class CallJava : MonoBehaviour {
    7.     public static AndroidJavaObject _ajo;
    8.     public static AndroidJavaClass _ajc;
    9.    
    10.     static CallJava() {
    11.         if(Application.platform != RuntimePlatform.Android) return;
    12.     }
    13.    
    14.     void OnGUI() {
    15.         if(GUI.Button(new Rect(Screen.width/2, 85, 200, 85), "doit")) {
    16.             using(_ajc = new AndroidJavaClass("com.ant.mobile.JAUnity"));
    17.             _ajo = _ajc.CallStatic<AndroidJavaObject>("instance");
    18.             _ajo.Call("doit");
    19.         }
    20.     }
    21. }
    22.  
    It all just dies, i wonder if its done a new way in 4.x?
     
  40. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    592
    We probably need a little more info than "just dies" to help you - did you try enabling AndroidJNIHelper.debug = true? When enabled it will display a bit more in logcat about what is going on under the hood.
     
  41. netlander

    netlander

    Joined:
    Nov 22, 2011
    Posts:
    27
    @ant001. Indeed, need to describe your problem in more detail. Do you get an exception in logcat? What does it say?

    @Erique BTW, I am still getting this intermittent and weird problem of Unity 4 closing the previously exported eclipse project. In fact I've established that Unity does not delete the project but it changes its folder into this archived file of sorts (without an extension but can be opened with 7zip). The problem is intermittent and happens sometimes when closing unity and at other time when opening and sometimes it leaves it alone.
     
  42. ant001

    ant001

    Joined:
    Dec 15, 2010
    Posts:
    116
    All works in Unity4 with the export project magic. I removed the using(...) around AndroidJavaClass.
    Now i'm looking return an image from android to Unity so I can use it as a texture.
     
  43. LiefLayer

    LiefLayer

    Joined:
    Jan 6, 2013
    Posts:
    37
    Hey can you help me?
    I export my project to eclipse with unity3d 4 and after I import to eclipse but:
    where are my c# class... in java?
    it's my first time I use eclipse I always used netbeans for java so I really can't find.


    if I run it work but there is a way to built in a eclipse player instead my android device.

    thank you a lot
     
    Last edited: Mar 7, 2013
  44. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    Last edited: May 9, 2013
  45. boco

    boco

    Joined:
    Dec 7, 2010
    Posts:
    373
  46. MikeWei

    MikeWei

    Joined:
    May 10, 2013
    Posts:
    1
    05-10 12:45:42.474: I/dalvikvm(7969): Unable to dlopen(/data/data/tw.edu.scu.csim.memory/lib/libQCARWrapper.so): Cannot load library: find_library[1188]: 66 'libQCARWrapper.so' failed to load previously
    05-10 12:45:42.474: E/Unity(7969): Unable to find QCARWrapper
    05-10 12:45:42.494: D/dalvikvm(7969): Trying to load lib /data/data/tw.edu.scu.csim.memory/lib/libQCARWrapper.so 0x45fda198
    05-10 12:45:42.494: I/dalvikvm(7969): Unable to dlopen(/data/data/tw.edu.scu.csim.memory/lib/libQCARWrapper.so): Cannot load library: find_library[1188]: 66 'libQCARWrapper.so' failed to load previously
    05-10 12:45:42.494: E/Unity(7969): Unable to find QCARWrapper
    05-10 12:45:42.514: I/Unity(7969): DllNotFoundException: QCARWrapper
    05-10 12:45:42.514: I/Unity(7969): at (wrapper managed-to-native) QCARNativeWrapper:cameraDeviceInitCamera (int)
    05-10 12:45:42.514: I/Unity(7969): at QCARNativeWrapper.CameraDeviceInitCamera (Int32 camera) [0x00000] in <filename unknown>:0
    05-10 12:45:42.514: I/Unity(7969): at CameraDeviceImpl.InitCameraDevice (Int32 camera) [0x00000] in <filename unknown>:0
    05-10 12:45:42.514: I/Unity(7969): at CameraDeviceImpl.Init (CameraDirection cameraDirection) [0x00000] in <filename unknown>:0
    05-10 12:45:42.514: I/Unity(7969): at QCARBehaviour.StartQCAR () [0x00000] in <filename unknown>:0
    05-10 12:45:42.514: I/Unity(7969): at QCARBehaviour.OnApplicationPause (Boolean pause) [0x00000] in <filename unknown>:0
    05-10 12:45:42.514: I/Unity(7969):
    05-10 12:45:42.514: I/Unity(7969): (Filename: Line: -1)
    05-10 12:45:43.374: I/Unity(7969): StopQCAR
    05-10 12:45:43.374: I/Unity(7969):
    05-10 12:45:43.374: I/Unity(7969): (Filename: ./Runtime/ExportGenerated/AndroidManaged/UnityEngineDebug.cpp Line: 54)
    05-10 12:45:43.374: I/Unity(7969): DllNotFoundException: QCARWrapper
    05-10 12:45:43.374: I/Unity(7969): at (wrapper managed-to-native) QCARNativeWrapper:cameraDeviceStopCamera ()
    05-10 12:45:43.374: I/Unity(7969): at QCARNativeWrapper.CameraDeviceStopCamera () [0x00000] in <filename unknown>:0
    05-10 12:45:43.374: I/Unity(7969): at CameraDeviceImpl.StopCameraDevice () [0x00000] in <filename unknown>:0
    05-10 12:45:43.374: I/Unity(7969): at CameraDeviceImpl.Stop () [0x00000] in <filename unknown>:0
    05-10 12:45:43.374: I/Unity(7969): at QCARBehaviour.StopQCAR () [0x00000] in <filename unknown>:0
    05-10 12:45:43.374: I/Unity(7969): at QCARBehaviour.OnApplicationPause (Boolean pause) [0x00000] in <filename unknown>:0
    05-10 12:45:43.374: I/Unity(7969):
    05-10 12:45:43.374: I/Unity(7969): (Filename: Line: -1)

    I tried to integrated an android project with an unity project(AR) exported by the unity4.0.0f4 on eclipse
    I only saw the button on screen,the camera seemed not work
    Who can help me,please~
     
  47. plus347

    plus347

    Joined:
    May 30, 2013
    Posts:
    3
    Hi guyz. I have a problem about this integration.

    My Programs these;

    --Windows 8
    --Eclipse Android Developer Tools Build: v22.0.1-685705
    --Unity Version 4.1.3f3 (Free Verison)
    --(Eclipse, configured for usage with Android. Also i have SDK and NDK for Eclipse)

    There has been no problem so far.

    This is my way; Please check this images for progress;
    1 -) http://imageshack.us/a/img824/2577/62989323.jpg

    2 -) http://imageshack.us/a/img694/9553/87939920.jpg

    3 -) http://imageshack.us/a/img834/2932/41970359.jpg

    4 -) http://imageshack.us/a/img812/4107/22726349.jpg

    5 -) http://imageshack.us/a/img580/2561/50320927.jpg

    6 -) http://imageshack.us/a/img37/812/71168178.jpg

    7 -) http://imageshack.us/a/img42/4664/15278199.jpg

    8 -) http://imageshack.us/a/img827/7533/88186679.jpg

    9 -) http://imageshack.us/a/img189/8295/82948361.jpg

    10 -) http://imageshack.us/a/img19/3133/92573402.jpg

    11 -) http://imageshack.us/a/img24/1301/45980306.jpg

    12 -) http://imageshack.us/a/img849/9531/38061475.jpg

    13 -) http://imageshack.us/a/img835/5936/32767633.jpg

    How can i solve this problem? Any idea? :confused:
     
  48. Peppercat

    Peppercat

    Joined:
    Oct 23, 2012
    Posts:
    6
    Hi! First let me thank you for the complete guide! But I've got some problems with the .jar included in the Temp/StagingArea that ain't being recognized by the Java Project. It's correct to include them manually? May I include them as Jar or as External jar? Thanks in advance!
     
  49. plus347

    plus347

    Joined:
    May 30, 2013
    Posts:
    3
    Hi.Add as external jar.
     
  50. citycrusher

    citycrusher

    Joined:
    Sep 26, 2010
    Posts:
    41
    Hello i've tried getting this working and feel i am getting so close. At first there was tons of errors and emulators not working.

    Now emulator building is smooth and fast and I can launch my app on the emulator with no errors in console or logcat.

    My only problem now is the "hello world" activity seems to take over if i add activity to the project of which my unity project is the library.
    If i add no activity to the project then the app quits at start up. i am pretty certain my issue is i am not setting up my unity project properly so that it will always launch at start up as the main activity.

    How is this bit done? I am pretty sure it is I have to add a bit of specialized code to the MainActivity.xml or do I have this all wrong?? ....I've looked around but can't seem to find any info on it?

    Sorry if these questions sound noobish... I haven't used eclipse before these attempts. Any help is much appreciated!

    this is the logcat feed from when I try to click open my app in the emulator:

    emulator closes immediately with message: "Sorry! The application PIXELCAT (process.com.pixelCat.pixelCatFree) has stopped unexpectedly. Please try again. (Force close)" :confused:
     
    Last edited: Aug 26, 2013