Unity : CommandInvokationFailure: Failed to recompile android resource files

I’m new to Unity. When trying to build the android apk, I have an compiling error. I updated Unity (5.6), SDK(24), JDK(1.8.0) Seems to have a problem with Java, however I don’t understand it. Does anyone ever had the same issue ? Thanks a lot. CommandInvokationFailure: Failed to recompile android resource files. /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/javac -bootclasspath “/Users/kwij1/Desktop/Android … Continue reading “Unity : CommandInvokationFailure: Failed to recompile android resource files”

I want to make a trace hanoi stack Using Stack

I need to make Tracing in Java Using Stack with game Tower of Hanoi. Note: I need 4 Times and show the Role of Stack please This is my code in java : package towersofhanoi; import java.util.Scanner; public class TowersofHanoi { public void TOH(int n, String start, String aux, String end) { if (n == … Continue reading “I want to make a trace hanoi stack Using Stack”

Downloading Unity .obb content via Android app

I am trying to make a apk with .obb files, alpha on the store, however when trying to download the .obb it doesnt extract correctly or doesnt load all of the content I am not sure, any help would be appreciated. its an Android structured app, with a assets folder coming from Unity, (which is … Continue reading “Downloading Unity .obb content via Android app”

Android Studio 2.3.3 won't load class file from JAR

I’ve copied a jar file into my project’s libs folder. Usually it will show me all of the files contained therein. For this one JAR file, it won’t display the class file embedded inside, but does display a manifest file. Let’s say the jar is custom-unity-activity.jar and the directory structure is comcustomactivitycustom-unity-activity.class. As far as … Continue reading “Android Studio 2.3.3 won't load class file from JAR”

Making a Google sign in plugin for Unity

So I’m trying to get a google sign in working for Unity I’m stuck however. I’m trying to convert an example into a Android library, which would call the sign in intent. I’ve tried searching but with no leads. This shows that you need to extract all the extra libraries and add them to your … Continue reading “Making a Google sign in plugin for Unity”

send data from unity to java android

I created an unity project and I’m trying to send data from c# to unity. on my c# code I implemented this code : AndroidJavaClass jc = new AndroidJavaClass(“com.unity3d.player.UnityPlayer”); AndroidJavaObject jo = jc.GetStatic<AndroidJavaObject>(“currentActivity”); jo.Call(“shareText”,”test”,”test”); It works on android on my activity : public class UnityActivity extends AppCompatActivity { public void shareText(String AppId,String PublisherID) { Log.e(“test”,”test”); … Continue reading “send data from unity to java android”

Core game logic loop to send data to channels in Netty

I want to send world state every 100 msec to all channels. But it calls only once. My code: public class IncomeMessageTcpHandler extends SimpleChannelInboundHandler<byte[]> { @Override public void channelActive(ChannelHandlerContext ctx) throws Exception { Channel channel = ctx.channel(); channel.eventLoop().scheduleAtFixedRate(new Runnable() { @Override public void run() { System.out.println(“send”); channel.writeAndFlush(GameLogic.Instance.flushMessageData()); } }, 100, 100, TimeUnit.MILLISECONDS); } } Now … Continue reading “Core game logic loop to send data to channels in Netty”

Call JAR file method in Unity

I create a android library in Android Studio and export a jar file. I created 2 class in library. One is SimpleClass second is PlayerClass. First I tried the code below it successfully call the method. JAVA package a.b.c.simplelibrary; public class SimpleClass{ public static String CallNumber(int nums){ return “Number is ” + nums; } } … Continue reading “Call JAR file method in Unity”

How to know if app/game was launched via notification on Android?

I’m making a game in Unity for Android. I have implemented a notification system. Notifications show and clicking on them opens the game. The thing I’m stuck on is how to know if the game/app is launched by tapping the notification? Here is the java code for the notification plugin I’m using https://github.com/GoShikhar/unity-android-notifications/blob/master/PluginSrc/app/src/main/java/net/agasper/unitynotification/UnityNotificationManager.java This is … Continue reading “How to know if app/game was launched via notification on Android?”