Start a new topic

Exporting Unity3d to Android Studio

Exporting Unity3d to Android Studio


Hi , I tried to export the unity3d sample to open it in android studio. It exported successfully without errors but it seems there are classes that are not exported. I tried to run the application in Android Studio but it gave me the error that there is no default activity. I looked at manifest file and the default activity com.wikitude.unity.WikitudeActivity wasn't in the project.
I'll appreciate if you can help me with this.

Thanks very much

Hi, I'll appreciate if someone from wikitude team can help me with this.

Thanks

Hi,

We're investigating this issue and will provide a fix as soon as possible.

Greetings

Nicola

Hi, 

I am also getting the same error. Please help me out. Can anyone from the wikitude team help me out.

Thanks

We are looking into this issue already. 

Any update on when this will be fixed or whether there is a temporary workaround? There does not even seem to be a "wikitude-unity-bridge" folder or lib as referenced many times in the unity export documentation
 

Hi Patrick,

we just updated the Unity Plugin including the fix for exporting the project properly to Android Studio. Please download version 1.0.1-1.0.0 of the plugin from www.wikitude.com/download.

Kind regars

Phil

Thanks very much Philipp

I tried the new version and I'm still getting the error of not finding the default activity which is com.wikitude.unity.WikitudeActivity . It would be great if you could upload a correctly built android studio project so that we can compare it to our own version and debug it faster.

Thanks very much

Best Regards

 

Hi m0j1,

if you follow the first version of the guide using the aar the gradle files should look like this:

build.gradle (Module: wikitudeUnityExample)

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
applicationId "com.wikitude.unityexample"
minSdkVersion 15
targetSdkVersion 22
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}

dependencies {
compile project(':wikitude-unity-bridge')
compile files('libs/unity-classes.jar')
}


 

build.gradle(Module: wikitude-unity-bridge):

configurations.create("default")
artifacts.add("default", file('wikitude-unity-bridge.aar'))

 

AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.wikitude.unityexample" android:installLocation="preferExternal">
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="22" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- Tell the system this app requires OpenGL ES 2.0. -->
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<!-- rear facing cam -->
<uses-feature android:name="android.hardware.camera" android:required="true" />
<!-- do not support small resolution screens -->
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="false" android:xlargeScreens="true" />
<application android:label="WikitudeUnity" android:debuggable="false" android:isGame="true" android:banner="@drawable/app_banner">
<activity android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:name="com.wikitude.unity.WikitudeActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />
</manifest>

 

Do you see any differences?

Best regards,
Simon

Thanks very much Simon, It is fixed now ;)

 

Hello Philipp,

I tried the new version and I'm still getting the error of not finding the default activity which is com.wikitude.unity.WikitudeActivity. I even compared it with the images of build.gradle file you have sent. I am not able to find the following lines in the build.gradle(Module: wikitude-unity-bridge):

      configurations.create("default")

      artifacts.add("default", file('wikitude-unity-bridge.aar'))

 

It would be geat if some will help me out.

 

Thanks very much

Best Regards

Hi,

just to make sure, have you followed the setup guide (the updated chapter on Export to Android Studio)?

Kind regards

Phil

Even the "wikitude-unity-bridge" folder or lib that is mentioned many times in the unity export documentation doesn't seem to be there. https://support.wikitude.com/support/discussions/topics/geometry dash subzero


Login or Signup to post a comment