Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Integrating Unity and Eclipse

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

  1. Linusmartensson

    Linusmartensson

    Joined:
    Dec 17, 2010
    Posts:
    4
    Hello everyone!

    I've been testing out Unity for the past couple of weeks to come to terms with the development pipeline and how it integrates with Android.

    Some issues have popped up, and also some solutions. Specifically, the build process and requirements to introduce plugins into Android-Unity projects is not quite straight-forward, and some steps are fairly hard to manage:

    • Integrating Android resources is, as I understand it, being worked on in the beta, but not yet there in release, and resource collisions still cause problems.
    • Working with Eclipse is complex, especially with regards to debugging the Java aspect of apps.
    • Some people have described issues when using custom icons and the like for market apps. (e.g. http://forum.unity3d.com/threads/71303-Market-icon-why-does-it-look-so-bad)
    • Building a Unity project where a 2D Android interface is then to be integrated.

    To this end, I have devised a process, which, at the moment, works well, and provides better integration with the android pipeline, as well as potentially better integration with shared Java libraries in Eclipse.

    However, this process involves accessing data from the temporary folder for the Unity project, "$ProjectRoot/Temp/StagingArea", meaning it is not future-proof, as Unity Android is not a fully released product yet and subject to change.

    For now, here is the solution I have constructed, in a fairly simple step-by-step manner:

    Prerequisites:
    Android SDK, NDK
    Eclipse, configured for usage with Android
    Unity Pro / Android advanced

    Note: Unlike official procedures, there is no need to introduce plugin files or any Java code into the Unity assets. Under some circumstances, you may still want to import java native libraries into the Unity project, but this is not necessary.

    1. Set up your Unity Android project as you would normally and hit Build.
    2. Enter your project folder, go to Temp/StagingArea.
    3. Copy all project files to a new folder.
    4. Import this folder as a new Android project in Eclipse.
    5. Mark this project as a library in the properties window for the project. (Right click on the project name, go to Properties->Android and mark "Is Library".)
    6. Create a new Android project in Eclipse. This will constitute the Java part of your project.
    7. Add the Unity Android project as a library to your new project. (Right click on the project name, go to Properties->Android, select "Add...", add the project.)
    8. Add the classes.jar library to the Library references for your new project. (In properties, go to Java_Build_path->Libraries, select "Add External Jar...", navigate to UNITY_INSTALLATION\Editor\Data\PlaybackEngines\androidplayer\bin and add classes.jar)
    9. Move the assets folder from the library project to the new project. (Android does not allow assets to be utilized in libraries, and this last step has to be repeated whenever the Unity project is rebuilt.)
    10. Optionally, copy the AndroidManifest file from the library project to the new project, as it contains some Unity configuration and will not be used unless moved to the executable project.

    Note that you will lose the one-step build process once you begin integrating the two projects in Eclipse, as the project has to be built in Unity, the asset folder copied to Eclipse and the whole project built again. Most of this process can be automated fairly easily using scripts however.

    At this point, you can instantiate an Activity as normal in Android, either by setting up a class extending UnityPlayerActivity, or rebuilding it yourself, as the source code for it is available and documented in UNITY_INSTALLATION\Editor\Data\PlaybackEngines\androidplayer\src\com\unity3d\player. How to do this is available at http://unity3d.com/support/documentation/Manual/Plugins.html.

    Once all of this is done, your library folder contains the assets utilized by the Unity engine (basically, the splash icon and an XML layout) and never has to be touched again. The only requirement that is posed here is that the asset folder in the new project is updated whenever the Unity project is recompiled. Any references to native libraries that need to be utilized in Unity can be managed in the new java project as in a normal Android project. Icons, debugging, signing, and other android-integration can now be managed from Eclipse.

    I release this hoping it will make your integration process with Unity easier, hope you enjoy. :)


    Linus Mårtensson
     
    Last edited: Dec 22, 2010
    chrisk8er likes this.
  2. Xroft666

    Xroft666

    Joined:
    Dec 24, 2010
    Posts:
    24
    Hi! Thank you for this guide, 'couse I really need it. I never worked with Eclipse, so it's complicate to me a bit. A need to import an Uity project to Eclipse, 'couse my boss wants to add to the project different simple components like menu and other things.
    I've stacked at the point 4. I dont have the menu "Import as Android Project" in the "Import" in Eclipse. If I am trying to import "Existing Projects into Workspace", Eclipse tells me that he cant find a project in the pointed folder. So as like I am trying to create a new Android project - there are bad things too :)
    So what is supposed me to do? Thank you!
     
  3. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    Did you install the ADT plugin for Eclipse?
     
  4. Linusmartensson

    Linusmartensson

    Joined:
    Dec 17, 2010
    Posts:
    4
    Well, I don't have Eclipse in front of me at the moment (since I'm not at work), but I believe what you have to do is create a new android project and in the window that opens up, select an option called something like "create project from existing source", then pick out the directory.


    Linus
     
  5. FIBO

    FIBO

    Joined:
    Dec 29, 2010
    Posts:
    1
    Thank you for your guide :). I have followed all steps already and now I have a problem about how to control my model in Unity by using Eclipse. Can you give me any suggestions?;(
     
  6. Xroft666

    Xroft666

    Joined:
    Dec 24, 2010
    Posts:
    24
    Hi everyone again. I'm sorry for my notanswering

    Erique:
    Well, it was found out that ADT plugin had been installed.
    If I want to create a new project THERE IS the "Android" folder
    But I dont have one when I want to "Import" project.

    Linus, here are my steps:
    1) Creating new project
    2) selecting "Android project"
    3) selecting "Create project from existing source" and pointing on Unity3d project
    4) bad thing. Eclipse is trying to find "AndroidManifest.xml" which definetly doesnt present in Unity project

    Thank you and help me plizzzzzz))
     
    Last edited: Jan 11, 2011
  7. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    Sure it is, under Temp/StagingArea after creating the build inside Unity. As Linus described:

     
  8. Xroft666

    Xroft666

    Joined:
    Dec 24, 2010
    Posts:
    24
    Which build? In Unity3d when building I create only .apk file
    As I understood StagingArea - is a Unity3d project
     
  9. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    Yes, and during this process it outputs temporary files under Temp/StagingArea.
     
  10. Xroft666

    Xroft666

    Joined:
    Dec 24, 2010
    Posts:
    24
    Oooh, thanks. The feedback will be soon :)
     
  11. Xroft666

    Xroft666

    Joined:
    Dec 24, 2010
    Posts:
    24
    still can't import :( errors during importing:

    [2011-01-11 19:16:51 - UnityPlayerActivity] Warning: AndroidManifest.xml already defines debuggable (in http://schemas.android.com/apk/res/android); using existing value in manifest.
    [2011-01-11 19:16:51 - UnityPlayerActivity] D:\Temp\ndroidProject\AndroidManifest.xml:2: error: No resource identifier found for attribute 'installLocation' in package 'android'

    change:
    Opened via "Pulsar Perspective". I think imported correctly.. at last

    change:
    I made everything stepbystep. But when I try to make a build in Eclipse I get the errors mentioned in this message

    change:
    fixed the problem setting in the manifest "using sdk = 7" but in the project properites sdk was set to android 2.2
    http://mobile.tutsplus.com/tutorials/android/move-to-sd-card/

    Have a last error:
    "R cannot be resolved to variable" in line 11 of "OnCreate(Bundle):void" in "src" folder

    change:
    Fixed by putting the variable directly without reference on R class
    But GOD DAMMIT it still doesnt work! No errors in project files, but there is one on project
    And it isnt shown in the console! Its clear! And the project doesnt want to compile
    Jeeeesus:(((
     
    Last edited: Jan 11, 2011
  12. Xroft666

    Xroft666

    Joined:
    Dec 24, 2010
    Posts:
    24
    Oookaaaay, I have no errors! But I do not actually understand how to link 'java-part' project to the 'unity-part' project.
    For instance in Java project I have an activity class which loads the 'hello Android' window. After this I want to load the unity build.
    So what do I need to do?

    Thanks :)
     
    Last edited: Jan 12, 2011
  13. ddfire

    ddfire

    Joined:
    Dec 22, 2010
    Posts:
    53
  14. Xroft666

    Xroft666

    Joined:
    Dec 24, 2010
    Posts:
    24
    sounds difficlult but thanks
    i just want to ask a few questions to be sure that there is sense to do this thing:

    1) Unity3d scripts have been compiled already and they cannot be modified?
    2) There is no access to data files, like models, textures, so they cannot be modified either?
    3) While Unity3d application working I cannot use Java-part functionality?
    4) So, this integrating is only for making pre-unity3d preperations, like 2D main menu etc, right?
     
  15. ashish

    ashish

    Joined:
    Dec 20, 2010
    Posts:
    26
    Hi call u hellp me in integration of unity project in eclispe i have lot's of problem....my mail id is a.verma.2906@gmail.com send a mail when u r online
     
  16. Milan_cool

    Milan_cool

    Joined:
    Jan 24, 2011
    Posts:
    22
    hiii everyone,
    i am new to the unity3d.i am developer in android.i develop a module in eclipse for android.I want to integrate with unity 3d.Can anyone please tell the steps for this.
     
  17. Xroft666

    Xroft666

    Joined:
    Dec 24, 2010
    Posts:
    24
    there are the steps you required in the first post
     
  18. rasarahul

    rasarahul

    Joined:
    Jan 19, 2011
    Posts:
    12
    Hii WhiteDevil
    I am able to integrate eclipse and unity3d,When the unity activity is running i want to show a menu when menu button is pressed...I tried this out with oncreateOptionsmenu but it didnot work..Can u help me out??
     
  19. robhuhn

    robhuhn

    Joined:
    Jun 21, 2009
    Posts:
    113
    you can add views in your activity like this for example:
    Code (csharp):
    1. getWindow().addContentView(myView, new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
    If you want to call a Java method from C# you have to write a plugin. Find a guide here.
     
  20. rasarahul

    rasarahul

    Joined:
    Jan 19, 2011
    Posts:
    12
    Hii Robhuhn
    What is myView in the above code,when we extend a unityplayer activity ther will be no view object then where will we get the view object from??
     
  21. robhuhn

    robhuhn

    Joined:
    Jun 21, 2009
    Posts:
    113
    As I understood you want to click a menu button in Unity and add a menu in Java? So myView would be your Android menu for example containing further views like buttons.
     
  22. EricJ13

    EricJ13

    Joined:
    Feb 28, 2009
    Posts:
    355
    Thank you Linusmartensson! This is extremely helpful.
     
  23. kbradford

    kbradford

    Joined:
    Mar 22, 2011
    Posts:
    4
    I'm following the steps and getting this error in Eclipse:
    ERROR/PackageManager(58): Package com.XXXX.XXXX has mismatched uid: 10043 on disk, 10038 in settings

    I commented out the package name, but as the directions say I am using the same package name for the library as I am for the application. Any ideas?
     
  24. recon

    recon

    Joined:
    Nov 28, 2009
    Posts:
    119
    If I want to skip making a library of my eclipse-android project, what different steps do I need to take? I tried just building the project as it where when I imported it to eclipse the first time, and I took the outputted .apk file it created and put it on my android device but it would just crash when I tried running it. The unity project itself is a completely empty project except for one script that is doing a screen printout.

    Do I absolutely need to create a library of my eclipse project, to be able to run it on my android device?
     
  25. Milan_cool

    Milan_cool

    Joined:
    Jan 24, 2011
    Posts:
    22
    yaa you have to create libray in eclipse.I you didnot create library then the size of apk will increase.Because .so files you have to include on assest of your project.That will lead a perfromance issue.So better create a library.
     
  26. Ohms

    Ohms

    Joined:
    May 3, 2009
    Posts:
    36
    Hello everyone, and thanks to Linus for this tutorial !

    So, I have tried to follow it and import a simple unity project in eclipse.

    After deploying application and waiting the auto-launch, I get an exception.

    The Logcat says :


    Does Anybody have an idea for my problem ?

    Please take a look to the picture : http://www.hostingpics.net/viewer.php?id=130291ProblemAndroid.jpg


    My configuration is :
    -Windows XP SP3
    -Android sdk revision 10
    -Unity 3.3
    -I set up my elipse project with Android 2.1
     
  27. Ohms

    Ohms

    Joined:
    May 3, 2009
    Posts:
    36
    Hello,

    I fixed my problem.

    For information, I copy/paste the assets/libs directory at the root of my project.
     
  28. ddfire

    ddfire

    Joined:
    Dec 22, 2010
    Posts:
    53
    hi
    first i have an welcome activity using the default android widgets then i launch the unity activity, but i need to finish it and go back to the previous activity, but instead the whole app is closed.

    any ideas????
    thanks!!!
     
  29. FiveFingers

    FiveFingers

    Joined:
    Oct 15, 2009
    Posts:
    541
  30. ahmed_ameen21

    ahmed_ameen21

    Joined:
    May 15, 2011
    Posts:
    4
    Hi,
    I made all the above steps and it runs perfectly on eclipse (with new unity project). But, when I try to make new project import any package and run the activity the following debug exception resulted:
    java.lang.UnsatisfiedLinkError: Couldn't load mono: findLibrary returned null
    .
    .
    .
    I am stuck for 2 days with this error Please advice.
     
  31. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    Make sure the libs/armeabi-v7a folder of your Eclipse project includes the necessary libraries (like libmono.so and libunity.so).
     
  32. ahmed_ameen21

    ahmed_ameen21

    Joined:
    May 15, 2011
    Posts:
    4
    Thanks, it works.
     
  33. Enzign

    Enzign

    Joined:
    Aug 20, 2010
    Posts:
    169
    Hi everyone. I've run into something strange when using eclipse. When the orientation of the screen changes, the app crashes when running it with eclipse. The same project in unity only works just fine. Anyone have seen this before or have any ideas what could cause this?
    Going to have a look at logcat and see if i can get any details.

    *Edit*
    Just a stack trace in logcat. Don't know how to get any relevant information from that i'm afraid. I configured it to only use Landscape Left from Unity, but when openfeint starts, it changes the orientation. Maybe i should just have openfeint do landscape left only as well.
     
    Last edited: Jun 7, 2011
  34. Enzign

    Enzign

    Joined:
    Aug 20, 2010
    Posts:
    169
    If i make an openfeint library and a unity library and create a project in Eclipse that uses these both libraries. Does anyone know if it's possible to execute code in the OpenFeint library in eclipse on runtime from my unity project? It seems like this should be possible by using JNI.FindClass and other JNI commands. But maybe i don't understand it correctly. The goal is to be able to use more functions in openfeint for android than the ones that are available in openfeintfacade.
     
  35. scone

    scone

    Joined:
    May 21, 2008
    Posts:
    244
    Meow.
     
  36. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    Yes, the openfeintfacade only provides a minimum set of 'relays' to the Java side. It's perfectly find to add more. The simplest way is usually to use the AndroidJavaClass/-Object to access methods/fields in an arbitrary Java class.
     
  37. soul_killer

    soul_killer

    Joined:
    Sep 29, 2011
    Posts:
    1
    Hi all,

    I tried to set up the eclipse project again using guideline from this site:
    http://unity3d.com/support/documenta...20Eclipse.html

    On this setup:
    1) i extended the VirtualBallPlayerActivity with UnityPlayerActivity.
    Previously extended with Activity.
    2) Commented setContentView(R.layout.main); in onCreate method.
    3) called VirtualBallPlayerActivity in AndroidManifest.xml

    So, now in my android... the application is starting the unityplayer but my unity virtualball app is not shown camera is not turned on.
    The sceen remains black with the remark only at the right bottom (trial version Development Build)

    Why is it so?? Anything i missed out? Please guide me...

    I've attached my androidanifest activity file:

    View attachment $AndroidManifest.txt
    View attachment $VirtualBallPlayerActivity.txt
     
  38. Russel

    Russel

    Joined:
    Oct 12, 2011
    Posts:
    40
    If I create a APK with Unity directly, the size is 9MB. If I run with Eclipse, but now the APK size is 21,90MB. Where does the difference? I have only one main activity which I start the AR player from Qualcomm Augmented Reality. The StagingArea for the Libary has a size of 33,7 MB.

    Can you help me?
     
  39. lbalasubbaiahapps

    lbalasubbaiahapps

    Joined:
    Oct 6, 2011
    Posts:
    23
    hi friends i follow all the step to connect the eclipse to unity3d(staging area and eclipse steps also).But i have one doubt how to test the eclipse and unity3d connected? and how to get the plugin from eclipse to unity3d.i followed this steps also http://unity3d.com/support/documentation/Manual/Plugins.html but i didnot get the plugin please wny one help me......
     
  40. Vedad

    Vedad

    Joined:
    Sep 29, 2011
    Posts:
    29
    Hey guys,

    I'm getting this error when attempting to launch an app from a device or emulator:
    Code (csharp):
    1.  
    2. W/dalvikvm(  400): threadid=1: thread exiting with uncaught exception (group=0x4
    3. 0015560)
    4. E/AndroidRuntime(  400): FATAL EXCEPTION: main
    5. E/AndroidRuntime(  400): java.lang.UnsatisfiedLinkError: Couldn't load mono: fin
    6. dLibrary returned null
    7. E/AndroidRuntime(  400):        at java.lang.Runtime.loadLibrary(Runtime.java:42
    8. 9)
    9. E/AndroidRuntime(  400):        at java.lang.System.loadLibrary(System.java:554)
    10.  
    11. E/AndroidRuntime(  400):        at com.unity3d.player.UnityPlayer.<init>(Unknown
    12. Source)
    13. E/AndroidRuntime(  400):        at com.unity3d.player.UnityWallpaperService.onCr
    14. eate(Unknown Source)
    15. E/AndroidRuntime(  400):        at android.app.ActivityThread.handleCreateServic
    16. e(ActivityThread.java:1945)
    17. E/AndroidRuntime(  400):        at android.app.ActivityThread.access$2500(Activi
    18. tyThread.java:117)
    19. E/AndroidRuntime(  400):        at android.app.ActivityThread$H.handleMessage(Ac
    20. tivityThread.java:985)
    21. E/AndroidRuntime(  400):        at android.os.Handler.dispatchMessage(Handler.ja
    22. va:99)
    23. E/AndroidRuntime(  400):        at android.os.Looper.loop(Looper.java:123)
    24. E/AndroidRuntime(  400):        at android.app.ActivityThread.main(ActivityThrea
    25. d.java:3683)
    26. E/AndroidRuntime(  400):        at java.lang.reflect.Method.invokeNative(Native
    27. Method)
    28. E/AndroidRuntime(  400):        at java.lang.reflect.Method.invoke(Method.java:5
    29. 07)
    30. E/AndroidRuntime(  400):        at com.android.internal.os.ZygoteInit$MethodAndA
    31. rgsCaller.run(ZygoteInit.java:839)
    32. E/AndroidRuntime(  400):        at com.android.internal.os.ZygoteInit.main(Zygot
    33. eInit.java:597)
    34. E/AndroidRuntime(  400):        at dalvik.system.NativeStart.main(Native Method)
    35.  
    36. W/ActivityManager(   68): Timeout executing service: ServiceRecord{4076ef68 com.
    37. Leviathan.livewallpapers/.WallpaperService}
    38. I/ActivityManager(   68): Crashing app skipping ANR: ProcessRecord{406bbd98 400:
    39. com.plugai.android.livewallpapers/10036} Executing service com.Leviathan.li
    40. vewallpapers/.WallpaperService

    As suggested earlier, I've checked to make sure the correct files are in the assets folder. The imported Unity project has been correctly added as a library, and the classes.jar file is set correctly as well. I can't think of any other reason why this would be happening. Any suggestions?

    Also, has anybody successfully created a Live Wallpaper using Unity? I'm actually in the middle of this right now, and having some trouble getting the right stuff in the project. Any suggestions on this?

    Thank you for any help,
    Vedad Dedajic
     
  41. deepak

    deepak

    Joined:
    Aug 10, 2010
    Posts:
    44
    Hey guys,
    I was able to follow every step without any problems. I somehow managed to get one, when running the project I get such a error
    [2011-11-15 18:40:16 - test] ------------------------------
    [2011-11-15 18:40:16 - test] Android Launch!
    [2011-11-15 18:40:16 - test] adb is running normally.
    [2011-11-15 18:40:16 - test] Could not find test.apk!
    I also noticed something unusual when I was trying to debug this problem. I found that my project properties was not holding on to the "Library" references check the image to get a better idea.



    Deepak
     
  42. SeungJae

    SeungJae

    Joined:
    Mar 24, 2011
    Posts:
    2
    Hello everyone

    I have tried to follow it and import a simple unity project in eclipse.

    After deploying application and waiting the auto-launch, I get an exception.

    The Logcat says :

    11-17 10:54:07.562: W/dalvikvm(3471): ERROR: Unable to find decl for native Lcom/unity3d/player/UnityPlayer;.nativeGetGLScreen:()Ljava/lang/String;
    11-17 10:54:07.562: W/dalvikvm(3471): ERROR: Unable to find decl for native Lcom/unity3d/player/UnityPlayer;.nativeGetGLContext:()Ljava/lang/String;
    11-17 10:54:07.562: W/dalvikvm(3471): ERROR: Unable to find decl for native Lcom/unity3d/player/UnityPlayer;.nativeResize:(IIII)V
    11-17 10:54:07.562: W/dalvikvm(3471): ERROR: Unable to find decl for native Lcom/unity3d/player/UnityPlayer;.nativeIsAutorotationOn:()Z
    11-17 10:54:07.562: E/dalvikvm(3471): JNI posting fatal error: com/unity3d/player/UnityPlayer
    11-17 10:54:07.562: E/dalvikvm(3471): VM aborting
    11-17 10:54:13.828: I/dalvikvm(3471): threadid=4: reacting to signal 3
    11-17 10:54:13.835: I/dalvikvm(3471): Wrote stack traces to '/data/anr/traces.txt'

    Does Anybody have an idea for my problem ?
     
  43. rbdias

    rbdias

    Joined:
    Dec 23, 2011
    Posts:
    6
  44. rbdias

    rbdias

    Joined:
    Dec 23, 2011
    Posts:
    6
    Let me be more clear:

    when integrating with eclipse, the generated libmono.so and libunity.so are big (3.7MB, 6.3MB), making the final APK also big.
    When you do not integrate with eclipse (build only with unity) these libs are smaller than 100K.

    Does anyone know how to make smaller libs with Eclipse?
    I tried to replace the libs of an eclipse generated APK with the smaller libs present on Unity generated APK, but it did not work.

    BR,
     
  45. mdelolmo

    mdelolmo

    Joined:
    Jan 25, 2012
    Posts:
    1
    Hi Guys,

    I'm facing the same issues as other users reported, it's to say:
    Code (csharp):
    1. 01-25 10:45:43.080: E/AndroidRuntime(701): java.lang.UnsatisfiedLinkError: Couldn't load mono: findLibrary returned null
    I understand I should import the libmono.so library on my project, but I can't find that library file, I mean, in my StagingArea\assets folder I can only see one folder, bin. The lib folder is missing.

    Any suggestion is extremely welcome, I need the Unity Activity be called from another Android Activity :(

    Edit: I already solved that, but I'm still having problems with libraries... oh that tutorial sucks so much...

    Thanks in advance.
     
    Last edited: Jan 26, 2012
  46. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    These steps look daunting. Albeit you are picking up scripts from an undocumented (subject to change) location. It would be nice to make a custom editor script that would sync and create an eclipse project without any manual steps. Something like: Assets->Sync to Eclipse would do it.
     
  47. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828


    I ran into a strange issue. When I use Android version 14, I can compile eclipse but I can't run on my phone.

    If I use Android version 10 for 2.3.3, I get a compile error.

    Code (csharp):
    1.  
    2. Description    Resource    Path    Location    Type
    3. error: Error: String types not allowed (at 'configChanges' with value 'fontScale|keyboard|keyboardHidden|locale|mnc|mcc|  navigation|orientation|screenLayout|screenSize|sma  llestScreenSize|uiMode|touchscreen').    AndroidManifest.xml    /Blank001    line 5    Android AAPT Problem
    4. error: Error: String types not allowed (at 'configChanges' with value 'fontScale|keyboard|keyboardHidden|locale|mnc|mcc|  navigation|orientation|screenLayout|screenSize|sma  llestScreenSize|uiMode|touchscreen').    AndroidManifest.xml    /Blank001    line 11    Android AAPT Problem
    5. error: Error: String types not allowed (at 'configChanges' with value 'fontScale|keyboard|keyboardHidden|locale|mnc|mcc|  navigation|orientation|screenLayout|screenSize|sma  llestScreenSize|uiMode|touchscreen').    AndroidManifest.xml    /Blank001    line 13    Android AAPT Problem
    6. error: Error: String types not allowed (at 'configChanges' with value 'fontScale|keyboard|keyboardHidden|locale|mnc|mcc|  navigation|orientation|screenLayout|screenSize|sma  llestScreenSize|uiMode|touchscreen').    AndroidManifest.xml    /Blank001    line 17    Android AAPT Problem
    7. error: Error: String types not allowed (at 'configChanges' with value 'fontScale|keyboard|keyboardHidden|locale|mnc|mcc|  navigation|orientation|screenLayout|screenSize|sma  llestScreenSize|uiMode|touchscreen').    AndroidManifest.xml    /BlankLibrary    line 5    Android AAPT Problem
    8. error: Error: String types not allowed (at 'configChanges' with value 'fontScale|keyboard|keyboardHidden|locale|mnc|mcc|  navigation|orientation|screenLayout|screenSize|sma  llestScreenSize|uiMode|touchscreen').    AndroidManifest.xml    /BlankLibrary    line 11    Android AAPT Problem
    9. error: Error: String types not allowed (at 'configChanges' with value 'fontScale|keyboard|keyboardHidden|locale|mnc|mcc|  navigation|orientation|screenLayout|screenSize|sma  llestScreenSize|uiMode|touchscreen').    AndroidManifest.xml    /BlankLibrary    line 13    Android AAPT Problem
    10. error: Error: String types not allowed (at 'configChanges' with value 'fontScale|keyboard|keyboardHidden|locale|mnc|mcc|  navigation|orientation|screenLayout|screenSize|sma  llestScreenSize|uiMode|touchscreen').    AndroidManifest.xml    /BlankLibrary    line 17    Android AAPT Problem
    11.  
    Is this an android bug? Or does Unity run some post-processing to clear up these version errors?

    Because the hello world app runs when directly built from Unity.

    Am I missing something???

    (edit)

    I moved the attribute from the AndroidManifest.xml which now compiles without errors:

    I removed the following line from both the android library and the android application:

    android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|n avigation|orientation|screenLayout|screenSize|smal lestScreenSize|uiMode|touchscreen"

    (to be continued)

    Progress:




    Docs:

    http://unity3d.com/support/documentation/Manual/Android-Integrating%20Unity%20With%20Eclipse.html

    http://unity3d.com/support/documentation/Manual/Plugins.html
     
    Last edited: Jan 30, 2012
  48. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    It might not be obvious and I overlooked it. But there are several complete project examples (near the bottom) that show how to build a the java/android bridge.

    http://unity3d.com/support/documentation/Manual/Plugins.html

    These work as a direct Android export from Unity.

    Exporting from Unity to Eclipse was not necessary (so far).
     
  49. Russel

    Russel

    Joined:
    Oct 12, 2011
    Posts:
    40
    How will this going without Eclipse? I don't understand.
     
    Last edited: Feb 6, 2012
  50. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    You can actually do a lot using the Java Plugin interface. Just keep in mind, don't compile with Java 1.7. You want to use 1.6.

    Try the java plugin sample.

    http://forum.unity3d.com/threads/122044-Help-with-JavaPluginSample-for-Android

    Everything you planned on doing in Eclipse, you can just put into a java library and invoke from Unity.

    Technically you could still use eclipse to build and include your java library.