- Home /
Unity2Eclipse plugin, unity JARs and Split Application Binary (OBB) issue.
Hi! I'm a bit stucked right now with my app's exporting to Eclipse. I've got a game splitted into an .apk file and an .obb file, that is working fine on device. But when I use unity2eclipse plugin to export my project to that IDE, the first scene (included in the .apk, of course) loads and works fine, but the next scene (included in the .obb) it crashes with the following log:
E/AndroidRuntime(14156): FATAL EXCEPTION: main
E/AndroidRuntime(14156): android.content.ActivityNotFoundException: Unable to find explicit activity class {barcel.ardjs/com.unity3d.player.VideoPlayer}; have you declared this activity in your AndroidManifest.xml?
E/AndroidRuntime(14156): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1405)
E/AndroidRuntime(14156): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1379)
E/AndroidRuntime(14156): at android.app.Activity.startActivityForResult(Activity.java:2827)
E/AndroidRuntime(14156): at android.app.Activity.startActivity(Activity.java:2933)
E/AndroidRuntime(14156): at com.unity3d.player.UnityPlayer$12.run(Unknown Source)
E/AndroidRuntime(14156): at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime(14156): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime(14156): at android.os.Looper.loop(Looper.java:138)
E/AndroidRuntime(14156): at android.app.ActivityThread.main(ActivityThread.java:3701)
E/AndroidRuntime(14156): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(14156): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime(14156): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
E/AndroidRuntime(14156): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
E/AndroidRuntime(14156): at dalvik.system.NativeStart.main(Native Method)
And this is my AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="barcel.ardjs" android:versionCode="1" android:versionName="1.0">
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="17" />
<application android:label="@string/app_name" android:icon="@drawable/icon" android:theme="@style/AppTheme">
<activity android:name=".ArDJs" android:enabled="true" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest
I tried building the .apk with all the scenes ticked in Unity -> build settings, but then (obviously) the Eclipse project ant the builded .apk grew enormous, so that's not a solution. Please help me, I'm new at Android developement, the Unity's project isn´t mine, my boss is growing impatient and I'm a bit lost (Ok, I'm completely lost). Is there a simple solution to export to eclipse an splitted project? May I modify manually my AndroidManifest.xml? How can I know my Unity's project activities so I can include them in the XML?
Thanks to everyone!
:::::::::::: EDIT ::::::::::::
Maybe it's not a problem of the splitted project; maybe I'm just missing a library or something. Actually I've got a lot of troubles with JAR's included in the side project UnityPlayerProxyActivity, and finally I had to include them manually. Could this be a similar problem? Any Ideas? Thanks!
::::::::::: EDIT #2 ::::::::::
I added a few lines in my AndroidManifest.xml to include the missing activity, so it looks like this now:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="barcel.ardjs" android:versionCode="1" android:versionName="1.0">
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="17" />
<application android:label="@string/app_name" android:icon="@drawable/icon" android:theme="@style/AppTheme" android:launchMode="singleTask" >
<activity android:name=".ArDJs" android:enabled="true" android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.unity3d.player.VideoPlayer" android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
</application>
</manifest>
But now I have another exception:
E/MediaPlayer(19889): Attempt to perform seekTo in wrong state: mPlayer=0x0, mCurrentState=1
E/MediaPlayer(19889): error (-38, 0)
E/MediaPlayer(19889): pause called in state 0
E/MediaPlayer(19889): Error (-38,0)
Any ideas? Thanks!
Your answer
Follow this Question
Related Questions
[Android+Eclipse]Get album image from mp3 file 0 Answers
How can I get project for Eclipse from Unity3D? 1 Answer
AndroidJavaException - java.lang.ClassNotFoundException 1 Answer
How do I use the Android Library in Unity? 0 Answers
Any resource for creating jar without extending UnityActivityPlayer? 1 Answer