Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

Integration Unity as a library in native Android app Version 2

Discussion in '2019.3 Beta' started by PavelLU, Sep 27, 2019.

  1. Overature

    Overature

    Joined:
    May 10, 2020
    Posts:
    18
    Hi, I had a similar problem and came up with a solution that should work for you. After exporting your unity project you need to manually import into Android studio each of the .aar files that is present in your exported library, (unityLibrary/libs). To do this in AS, go to File - New - Import .JAR/.AAR Package, and select the .aar file. Do this for all the .aar files.

    Then in your build.gradle (Module:app) file add each .aar to the dependencies section. The same way that you added the "implementation project(':unityLibrary')" before. For me one of them was: "implementation project(':arcore_client')"
    You don't need to implement files trees for these one.

    Then in the build.gradle(Module: unityLibrary), as you have above, you need to delete each of the implementations that are automatically added. Leave the top file tree one.

    That should work for you!
     
  2. adam_sutcliffe

    adam_sutcliffe

    Joined:
    May 18, 2017
    Posts:
    3
    I'm having display issues when it comes to running the framework on an android device, my game works fine in the Unity sim, and on iOS, but a `build and run` or project export both cause very weird display issues as seen in the attached picture. I've tried all permutations of the rendering settings in the Player Settings but to no avail. Anyone else had this issue?
     

    Attached Files:

  3. bobejner96

    bobejner96

    Joined:
    Aug 15, 2020
    Posts:
    3
    Hi everyone,

    I've got this error constantly, can not make any progress further. I followed all suggested instructions for setup.
    Trying to build AR Foundation for RN app. Unity build passes ok, but this i stuck at run-android of react native project.

    Could not find method implementation() for arguments [project ':unityLibrary'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

    Any ideas?

    Unity: 2020.1.2f

    Thanks!
     
  4. joasus12345

    joasus12345

    Joined:
    Dec 26, 2018
    Posts:
    14
    I was running into an error in which I can't reopen the game for a second time. I'm using a bottom navigation activity and from one of the fragments I launch unity. But the while app crashes when trying to open the unity player activity for a second time
    Null pointer dereference and segmentation fault.
    I see that it may be related to these (screenshots and links) but wasn't able to get a fix yet. I've been trying for a long time now
    The screenshots are from this link, the version 1 tutorial: https://forum.unity.com/threads/integration-unity-as-a-library-in-native-android-app.685240/
    If someone could link me to the case1163573 mentioned then that would be great as well
     

    Attached Files:

  5. silverduck

    silverduck

    Joined:
    May 16, 2010
    Posts:
    27
    I've got this all working except that when the Unity activity is launched, it doesn't display my Static Splash Image. I just upgraded to Unity 2019.4.8f1. Before then, I had Unity integrated into my native Android app using the unofficial unsupported methods and the Splash Image always appeared as intended. I'm not sure why it's not showing up now.

    Are there any special considerations that are required now to get splash images or such to appear?
     
  6. adam_sutcliffe

    adam_sutcliffe

    Joined:
    May 18, 2017
    Posts:
    3
    I've got an issue with the the `libmain.so` failing to load as the library isn't found. Any ideas what could cause this? I've done the setup and integration as instructed. The build is fine then on click of 'Show Unity' button I get this error:
    Unity: Failed to load 'libmain.so', the application will terminate.


    Code (JavaScript):
    1. AndroidRuntime: FATAL EXCEPTION: main
    2.     Process: com.brainbow.peak.app, PID: 31512
    3.     java.lang.UnsatisfiedLinkError: dlopen failed: library "libmain.so" not found
    4.         at java.lang.Runtime.loadLibrary0(Runtime.java:1087)
    5.         at java.lang.Runtime.loadLibrary0(Runtime.java:1008)
    6.         at java.lang.System.loadLibrary(System.java:1664)
    7.         at com.unity3d.player.UnityPlayer.<clinit>(Unknown Source:13)
    8.         at com.unity3d.player.UnityPlayerActivity.onCreate(UnityPlayerActivity.java:41)
    9.         at com.brainbow.unitygameframework.OverrideUnityActivity.onCreate(OverrideUnityActivity.java:31)
    10.         at com.brainbow.peak.app.ui.gamelauncher.MainUnityGameActivity.onCreate(MainUnityGameActivity.java:11)
    11.         at android.app.Activity.performCreate(Activity.java:7995)
    12.         at android.app.Activity.performCreate(Activity.java:7979)
    13.         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
    14.         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
    15.         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
    16.         at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
    17.         at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
    18.         at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
    19.         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
    20.         at android.os.Handler.dispatchMessage(Handler.java:106)
    21.         at android.os.Looper.loop(Looper.java:223)
    22.         at android.app.ActivityThread.main(ActivityThread.java:7656)
    23.         at java.lang.reflect.Method.invoke(Native Method)
    24.         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
    25.         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
     
  7. adam_sutcliffe

    adam_sutcliffe

    Joined:
    May 18, 2017
    Posts:
    3
    Okay so I think I've found the cause of this issue, I hadn't updated my custom activity to use a separate process in the manifest as the one in the example does. That being said my main app uses Firebase for a variety of tasks and this has now thrown up more new and exciting errors :mad:
     
  8. bobejner96

    bobejner96

    Joined:
    Aug 15, 2020
    Posts:
    3
    Ok, so i got it working.
    My goal was to integrate Unity with ReactNative.
    I think there was missmatch in some versions between, so at the and i used:
    Unity 2019.3 and nreact-native-unity-view package from npm site.

    My goal is to achieve AR Foundation + ARKit/Core experience in ReactNative app. And now i am stucked with ImageTracking on iOS. Same case as number #8 on this: https://forum.unity.com/threads/ar-foundation-2-0-image-target-ios-problem.685498/ . Any ideas maybe?
     
  9. MuuM

    MuuM

    Joined:
    Aug 4, 2017
    Posts:
    4
     
  10. MuuM

    MuuM

    Joined:
    Aug 4, 2017
    Posts:
    4
    @
    When I use VideoPlayer to Play a Video,But It can not work in Android Native
     
  11. IonutPutinica

    IonutPutinica

    Joined:
    Sep 13, 2020
    Posts:
    1
    Hey guys, I followed the tutorial, but it seems that I am getting a bunch of errors, would someone mind taking a look and give me a hint on what might be happening? I want to mention that I tried to also run the official project that is linked in the tutorial, but not even that one runs, giving me a similar set of errors to what my project is giving
    https://imgur.com/a/iSwXvWj
     
    john_goren likes this.
  12. DaniilK711

    DaniilK711

    Joined:
    Sep 21, 2020
    Posts:
    3
    Where in the code the Unity buttons are? I found the Android buttons that I can move around and so on, but I dont see the Unity buttons that are transparent in color
     
  13. DaniilK711

    DaniilK711

    Joined:
    Sep 21, 2020
    Posts:
    3
    Who ever comes in here with the same question buttons are in the Cube.cs. It is so disorganized :(((
     
  14. darmane_UNITY

    darmane_UNITY

    Joined:
    Nov 30, 2018
    Posts:
    1
    Hi! Did someone find the answer to that question?

    I'm stuck in this point... Thanks!
     
  15. nss2

    nss2

    Joined:
    Feb 28, 2019
    Posts:
    2
    Hi, currently I'm testing the sample using Unity 2020.1.6f1 for Android. Everything goes fine until I want to Run it on a device, it shows an error with c++ files:
    I Exported using IL2CPP Backend.
    upload_2020-11-4_16-59-35.png

    If anyone has a solution for this, please tell me, thanks.
     
    john_goren likes this.
  16. Overature

    Overature

    Joined:
    May 10, 2020
    Posts:
    18
    You should try setting the APi Compatibility level to .NET 4.x. That is what I have.
     
  17. AIStudio

    AIStudio

    Joined:
    Apr 10, 2017
    Posts:
    1
    How solve this error?
     
  18. Overature

    Overature

    Joined:
    May 10, 2020
    Posts:
    18
    Every time you export the Unity project to AS, then AS will add those implementation names to the build.gradle (module unityLibrary) file. see my previous comment:

    Hi, I had a similar problem and came up with a solution that should work for you. After exporting your unity project you need to manually import into Android studio each of the .aar files that is present in your exported library, (unityLibrary/libs). To do this in AS, go to File - New - Import .JAR/.AAR Package, and select the .aar file. Do this for all the .aar files.

    Then in your build.gradle (Module:app) file add each .aar to the dependencies section. The same way that you added the "implementation project(':unityLibrary')" before. For me one of them was: "implementation project(':arcore_client')"
    You don't need to implement files trees for these one.

    Then in the build.gradle(Module: unityLibrary), as you have above, you need to delete each of the implementations that are automatically added. Leave the top file tree one.
     
  19. chris_unity549

    chris_unity549

    Joined:
    Aug 28, 2020
    Posts:
    6
  20. andreibacch

    andreibacch

    Joined:
    Dec 19, 2020
    Posts:
    3
    Calling unload and trying to start the UnityPlayer again causes a SISEGV crash. Can you please tell me exactly how to accomplish this unload pattern?

    I'm trying to run the UnityPlayer on Android in the same process as the app. I'm calling unload before destroying the activity that's hosting UnityPlayer. That works fine. When coming back to the activity though, and starting the UnityPlayer once again, it crashes like so:

    Code (CSharp):
    1. 2021-01-14 18:52:23.116 28566-32459/com.bacch.androidemo E/AndroidRuntime: FATAL EXCEPTION: UnityMain
    2.     Process: com.bacch.androidemo, PID: 28566
    3.     java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    4.     Version '2019.4.11f1 (2d9804dddde7)', Build type 'Development', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
    5.     Build fingerprint: 'samsung/gts4lwifixx/gts4lwifi:10/QP1A.190711.020/T830XXU4CTJ1:user/release-keys'
    6.     Revision: '7'
    7.     ABI: 'arm64'
    8.     Timestamp: 2021-01-14 18:52:22+0200
    9.     pid: 28566, tid: 32459, name: UnityMain  >>> com.bacch.androidemo <<<
    10.     uid: 10455
    11.     signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
    12.     Cause: null pointer dereference
    13.         x0  0000000000000000  x1  0000000000000000  x2  0000000000000000  x3  0000000000000041
    14.         x4  0000000000000021  x5  6563ffffffffffff  x6  0000000000000000  x7  0000008000000000
    15.         x8  000000778cc072d8  x9  0000000000000001  x10 0000000000000000  x11 0000000000000000
    16.         x12 0101010101010101  x13 0000000000000005  x14 0000000000000000  x15 0000ea98f753d4f8
    17.         x16 00000077ccce6900  x17 00000078b82776f0  x18 0000007789f96000  x19 00000077896e7d18
    18.         x20 00000077896e7d10  x21 0000000000000000  x22 000000778cc05950  x23 00000077c6be914f
    19.         x24 0000000000000004  x25 000000778cc07020  x26 000000782baab4b0  x27 0000000000000001
    20.         x28 000000778cc056e0  x29 000000778cc056e0
    21.         sp  000000778cc05460  lr  00000077cbcd6a94  pc  00000077cbcd6a94
    22.    
    23.     backtrace:
    24.           #00 pc 000000000067fa94  /data/app/com.bacch.androidemo--VinOgfdD1qG_nG4wsylTw==/base.apk (BuildId: d56f4052c5adf991c99fcd47dc6217de65f73146)
    25.           #01 pc 000000000065443c  /data/app/com.bacch.androidemo--VinOgfdD1qG_nG4wsylTw==/base.apk (BuildId: d56f4052c5adf991c99fcd47dc6217de65f73146)
    26.           #02 pc 000000000067ff5c  /data/app/com.bacch.androidemo--VinOgfdD1qG_nG4wsylTw==/base.apk (BuildId: d56f4052c5adf991c99fcd47dc6217de65f73146)
    27.           #03 pc 0000000000658084  /data/app/com.bacch.androidemo--VinOgfdD1qG_nG4wsylTw==/base.apk (BuildId: d56f4052c5adf991c99fcd47dc6217de65f73146)
    28.           #04 pc 00000000006824b4  /data/app/com.bacch.androidemo--VinOgfdD1qG_nG4wsylTw==/base.apk (BuildId: d56f4052c5adf991c99fcd47dc6217de65f73146)
    29.           #05 pc 0000000000140350  /apex/com.android.runtime/lib64/libart.so (art_quick_generic_jni_trampoline+144) (BuildId: ba99912d54be0cff337b2a5059f6d2f7)
    30.           #06 pc 0000000000137334  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: ba99912d54be0cff337b2a5059f6d2f7)
    31.           #07 pc 0000000000145fec  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+244) (BuildId: ba99912d54be0cff337b2a5059f6d2f7)
    32.           #08 pc 00000000002e3750  /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+384) (BuildId: ba99912d54be0cff337b2a5059f6d2f7)
    33.           #09 pc 00000000002de9b0  /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+892) (BuildId: ba99912d54be0cff337b2a5059f6d2f7)
    34.           #10 pc 00000000005a3568  /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirect+424) (BuildId: ba99912d54be0cff337b2a5059f6d2f7)
    35.           #11 pc 0000000000131914  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: ba99912d54be0cff337b2a5059f6d2f7)
    36.           #12 pc 00000000005a3fb0  /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+1040) (BuildId: ba99912d54be0cff337b2a5059f6d2f7)
    37.           #13 pc 0000000000131994  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: ba99912d54be0cff337b2a5059f6d2f7)
    38.           #14 pc 00000000005a2d20  /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+1788) (BuildId: ba99912d54be0cff337b2a5059f6d2f7)
    39.           #15 pc 0000000000131a14  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: ba99912d54be0cff337b2a5059f6d2f7)
    40. 2021-01-14 18:52:23.118 28566-32459/com.bacch.androidemo E/AndroidRuntime:       #16 pc 00000000002b4a64  /apex/com.android.runtime/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.12109930742295516082)+240) (BuildId: ba99912d54be0cff337b2a5059f6d2f7)
    41.           #17 pc 00000000005927a8  /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1032) (BuildId: ba99912d54be0cff337b2a5059f6d2f7)
    42.           #18 pc 0000000000140468  /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: ba99912d54be0cff337b2a5059f6d2f7)
    43.           #19 pc 0000000002068d3c  /memfd:/jit-cache (deleted)
    44.    
    45.         at base.0x67fa94(Native Method)
    46.         at base.0x65443c(Native Method)
    47.         at base.0x67ff5c(Native Method)
    48.         at base.0x658084(Native Method)
    49.         at base.0x6824b4(Native Method)
    50.         at libart.art_quick_generic_jni_trampoline(art_quick_generic_jni_trampoline:144)
    51.         at libart.art_quick_invoke_stub(art_quick_invoke_stub:548)
    52.         at libart.art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)(Invoke:244)
    53.         at libart.art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)(ArtInterpreterToCompiledCodeBridge:384)
    54.         at libart.bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)(DoCall<false, false>:892)
    55.         at libart.MterpInvokeDirect(MterpInvokeDirect:424)
    56.         at libart.mterp_op_invoke_direct(mterp_op_invoke_direct:20)
    57.         at libart.MterpInvokeStatic(MterpInvokeStatic:1040)
    58.         at libart.mterp_op_invoke_static(mterp_op_invoke_static:20)
    59.         at libart.MterpInvokeInterface(MterpInvokeInterface:1788)
    60.         at libart.mterp_op_invoke_interface(mterp_op_invoke_interface:20)
    61.         at libart.art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.12109930742295516082)(Execute:240)
    62.         at libart.artQuickToInterpreterBridge(artQuickToInterpreterBridge:1032)
    63.         at libart.art_quick_to_interpreter_bridge(art_quick_to_interpreter_bridge:88)
    64.         at jit-cache (deleted).0x2068d3c(Native Method)
    65.  
     
  21. unity_DlCazeYImtT3qg

    unity_DlCazeYImtT3qg

    Joined:
    Jul 1, 2020
    Posts:
    1
    Hello everyone,

    When I run the app on my device (Android) with Android Studio and with the full example folder everything works fine.

    But when I start a very new project or when i'm using those folders (https://github.com/Unity-Technologies/uaal-example) and follow all the steps, when I run the app and click on "Show Unity" the app crashed every time and without any errors....

    When I look to the UnityProject folder there is a lots of differences between "mine" and the full example folder. And I don't understand why, I'm using the same Unity version....

    Is there some steps missing in the construction/strucutre of the UnityProject folder ?? Why are there so different ?

    I have read that some people got the same issue than me, but I haven't seen any answers.

    Any help will be very welcome !
    Thanks !
     
  22. chris_unity549

    chris_unity549

    Joined:
    Aug 28, 2020
    Posts:
    6
    Hello,

    The crash happens because you close the Activity. If you "finish()" the Activity then the UnityPlayer is destroyed and that kills the entire process - which the same process your main app is running. Are you sure the entire app isn't restarted? You can check the error logs for "Broken pipe" or something similar to that.

    If you don't close the Activity and just go back the way the UaaL example does it then you are at the same place we are on my initial post.
     
  23. andreibacch

    andreibacch

    Joined:
    Dec 19, 2020
    Posts:
    3
    @chris_unity549 But I need to kill the activity. I'm distributing this as part of a library to customers. I can't forsee their activity lifecycle/flow and for sure I can't start their own activities for them. Even if I were in charge of the activity lifecycle, what the UaaL example is proposing is a dirty workaround that manipulates the activity lifecycle and is prone to a lot of errors.

    What's even more interesting is that Application.Unload documentation suggests that I should be able to re-run UnityPlayer in the same process however many times I would like. This documentation is proven to be false information.

    "On iOS and Android, unloads the release memory related to Scenes and GameObjects, but keeps a minimal amount of memory that the engine requires. This makes it possible to run Unity again in the same process. For more information, see documentation on Unity as a Library for iOS and Android." - FALSE

    There are a lot of other people on here (one example of many, EDIT (seems it's your post haha) ) who are struggling with this very restrictive behaviour, that pretty much makes the "unity project as android library" feature useless.

    Our company is now considering cancelling the Unity Pro subscriptions we have (about 22 seats) so we can move to a less restrictive platform,.
     
    Last edited: Jan 24, 2021
    dimitris_baud likes this.
  24. chris_unity549

    chris_unity549

    Joined:
    Aug 28, 2020
    Posts:
    6
    We are in the same boat as you pretty much. We are creating a module to be distribute to other clients were we have no control over the Activity lifecycle.

    So far we have tried different approach but nothing worked out.

    andreibacch as far as I can understand, Unload works fine if you don't kill the Activity. If the Activity is killed then the resources that Unload kept will be discarded.
     
    Last edited: Jan 20, 2021
    dimitris_baud likes this.
  25. dimitris_baud

    dimitris_baud

    Joined:
    Jan 15, 2018
    Posts:
    29
    Dear Unity and @PavelLU,

    Until there is a response or solution to the above, please at least add a large warning to the top of the Post that informs users of this issue so that they don't discover this limitation late in their projects, like some of us.

    Thank you.
     
    MarcSpraragen and john_goren like this.
  26. Frz95

    Frz95

    Joined:
    Apr 29, 2016
    Posts:
    7
    Why my AndroidStudio popup this message ? I followed all the steps and also my device is using Android 9.0, API 28. Can someone help me please.

    upload_2021-2-19_15-27-54.png
    upload_2021-2-19_15-29-19.png
     
  27. nilsdr

    nilsdr

    Joined:
    Oct 24, 2017
    Posts:
    348
    Is this still the most up to date guide on integration with unity as a library? We have to jump through a lot of hoops to get things to compile correctly, the clues for a lot of which are scattered throughout the forum
     
    john_goren likes this.
  28. Overature

    Overature

    Joined:
    May 10, 2020
    Posts:
    18
  29. Frz95

    Frz95

    Joined:
    Apr 29, 2016
    Posts:
    7
  30. nilsdr

    nilsdr

    Joined:
    Oct 24, 2017
    Posts:
    348
    Try adding this to the application tag of your androidmanifest:

    android:extractNativeLibs="true"
     
    Frz95 likes this.
  31. john_goren

    john_goren

    Joined:
    Mar 19, 2021
    Posts:
    8
    I am having the same experience. Would love to work on a more modern guide with a FAQ for troubleshooting common pitfalls and maybe some more background context as to what is actually going on with the Unity folder.
     
  32. Frz95

    Frz95

    Joined:
    Apr 29, 2016
    Posts:
    7
    Thank you so much ! It works now !!
     
    nilsdr likes this.
  33. Frz95

    Frz95

    Joined:
    Apr 29, 2016
    Posts:
    7
    Hi, I followed all the steps given and managed to display unity in Native app. But when I included the Vuforia package inside Unity, the app can switch from native to Unity, but after it displays the Unity watermark, the screen just becomes black and nothing happen. Can you guys help me ? I'm not expert in migration. TQ in advance.
     

    Attached Files:

    • 1.png
      1.png
      File size:
      20.8 KB
      Views:
      14
    • 2.png
      2.png
      File size:
      42.8 KB
      Views:
      12
    • 3.png
      3.png
      File size:
      62.8 KB
      Views:
      10
    • 4.png
      4.png
      File size:
      66.5 KB
      Views:
      10
    • 5.png
      5.png
      File size:
      52.7 KB
      Views:
      11
  34. john_goren

    john_goren

    Joined:
    Mar 19, 2021
    Posts:
    8
    It sounds like you might be experiencing this common bug: https://stackoverflow.com/questions...m-unity3d-player-unityplayer-nativerestartact
     
  35. nilsdr

    nilsdr

    Joined:
    Oct 24, 2017
    Posts:
    348
    Check and post your adb logcat output
     
  36. Frz95

    Frz95

    Joined:
    Apr 29, 2016
    Posts:
    7
    This is the error:
    upload_2021-4-26_13-38-51.png

    upload_2021-4-26_13-39-11.png
     
  37. john_goren

    john_goren

    Joined:
    Mar 19, 2021
    Posts:
    8
    For anyone who runs into trouble with this 2019 tutorial technique, especially if struggling with dependency issues:

    I found it was MUCH simpler to just open what Unity has exported, stick my launcher app activity into /launcher/src/main/java/{your namespace here}, assign an Intent filter to launch it, and then watch it just work. Depending on your needs, you may might want to try that more straightforward route first before attempting the technique above. If I had done that first, and trusted my gut, it would have saved a lot of heartache.

    I'm not sure if this is because the tutorial is old or if it's just that my project has finicky Vuforia C++ source objects that caused trouble. (A very simple Unity game without Vuforia seemed to work great with these steps, but as soon as I installed Vuforia, it was build error city.)
     
    Last edited: Apr 27, 2021
unityunity