- Home /
Help building changes to .java file included in Unity supplied package.
I just downloaded the Mobclix package that was posted in the Unity Forums. I made a minor change the mobclixtestactivity.java in hopes I could rebuild it.
Downloaded the jdk for the first time and tried 'javac mobclixtestactivity.java' and got a bunch of errors (a small sample):
mobclixtestactivity.java:3: package com.unity3d.player does not exist import com.unity3d.player.; ^ mobclixtestactivity.java:5: package android.os does not exist import android.os.Bundle;*
Clearly I'm missing some set-up here... path info? Maybe I need to build it differently?
Any help is appreciated.
Answer by Tseng · Mar 04, 2011 at 09:54 AM
Well, you can't compile it with only the SDK alone.
First of, yes you need some class paths to both the unity .jar files (should be somewhere in the unity editors folder) and android .jar files, which you can get from the Android SDK page.
However, I wouldn't suggest you too do this with command line tools as it could be a pain in the ass. You should rather download Eclipse, ADT Plugin for Eclipse (Android Developer Tool) and the SDK(s) themselves. On the android SDK page you get a Setup Tool which basically can download different versions of the SDKs and Emulator ROMs.
This one will allow you to make android apps. I'm however not sure if unity itself can or can't compile the files or how you make the final *.apk of your game, since I haven't got Android Basic/Pro license yet, I've just did standalone/pure Android Apps before with Eclipse + Android SDK (without unity)
Your answer
Follow this Question
Related Questions
Now that Unity 4.1.2 broke the Android plugin examples, what do you use to learn them? 1 Answer
How do I override an Android Java class in Unity? 1 Answer
How to write a java lib for unity as a plugin to make run another android app? 1 Answer
Problem reading sensor plugin, event won't trigger 2 Answers