- Home /
About Unity4.0 Creat Eclipse Project
Hello everyone! I would like to ask a question:since unity4.0,We can export android as a Eclipse Project!Like this:
Yes!We can see three .java files, They are all Automatic generation.
My question:
1.What are their uses?can delete? 2.Among DemoProxyActivity.java is extends Activity and it's "android.intent.action.MAIN". But if i want to call android API, I must make class extends UnityPlayerActivity and set "android.intent.action.MAIN" too.
so They are in conflict! 3.I try to Set DemoProxyActivity.java extends UnityPlayerActivity,But not used! so,How should I do?
PS:I am Chinese,English is not good,Thank you!!Please help me!
You cannot delete these files!
This are the android files that surround the unity project. They are launched when you launch your application, and they are in charge of launching the unity player to run your game.
@tbkn: Actually i delete all these files,it can be run Normal as before
Doesn't make sense... you can see in the android manifest file that these are the activities that are launched when your app starts. It shouldn't work if they're not there. $$anonymous$$aybe they were auto-generated again when you compiled and installed the app?
@tbkn:This is the: 1.I delete these three files,Of course,in Android$$anonymous$$anifest.xml i have Remove all of them. 2.I Create a new class named "Hello.java" extends UnityPlayerActivity and in Android$$anonymous$$anifest.xml, and I set it as "android.intent.action.$$anonymous$$AIN". 3.Generate AP$$anonymous$$ and run,Success!I tested, i am sure!
code:Hello.java:
package com.EVA.Demo;
import android.os.Bundle;
import com.unity3d.player.UnityPlayerActivity;
public class Hello extends UnityPlayerActivity
{
protected void onCreate (Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
}
}
Android$$anonymous$$anifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" android:theme="@android:style/Theme.NoTitleBar" package="com.EVA.Demo" android:versionName="1.0" android:versionCode="1">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
<application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="false">
<activity android:name="com.EVA.Demo.Hello" android:launch$$anonymous$$ode="singleTask" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|ui$$anonymous$$ode|touchscreen" android:screenOrientation="reverseLandscape">
<intent-filter>
<action android:name="android.intent.action.$$anonymous$$AIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-feature android:glEsVersion="0x00020000" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-feature android:name="android.hardware.touchscreen" />
<uses-feature android:name="android.hardware.touchscreen.mul$$anonymous$$ch" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.mul$$anonymous$$ch.distinct" android:required="false" />
<uses-sdk android:$$anonymous$$SdkVersion="15" android:targetSdkVersion="15" />
</manifest>
$$anonymous$$yproject:
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
null texture passed to GUI.DrawTexture 0 Answers
Extracting Dataset (AR) from OBB (Expansion Files) 1 Answer
GUIText Alpha transparency not working on Android Table? 0 Answers
When exporting android project to an eclipse project the music doesn't export 0 Answers