我在Unity3d上使用Smartfoxserver api,它在恢复我的macbook之前工作正常,但现在给出了如下连接错误:
Http error creating http connection: System.Net.Sockets.SocketException: Connection refused
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in <filename unknown>:0
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in <filename unknown>:0
at System.Net.Sockets.TcpClient.Connect (System.Net.IPEndPoint remote_end_point) [0x00000] in <filename unknown>:0
at System.Net.Sockets.TcpClient.Connect (System.Net.IPAddress[] ipAddresses, Int32 port) [0x00000] in <filename unknown>:0
UnityEngine.Debug:Log(Object)
SFS2X_Connect:OnConnection(BaseEvent) (at Assets/SFS2X_Connect.cs:2758)
Sfs2X.Core.EventDispatcher:DispatchEvent(BaseEvent)
Sfs2X.SmartFox:ProcessEvents()
SFS2X_Connect:Update() (at Assets/SFS2X_Connect.cs:2764)
Run Code Online (Sandbox Code Playgroud)
这是连接代码:
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.UI;
using System.Collections;
using Sfs2X;
using Sfs2X.Core;
public class SFS2X_Connect : MonoBehaviour {
public string Host = "127.0.0.1";
[Tooltip("TCP …Run Code Online (Sandbox Code Playgroud) 我的项目工作正常,当我将facebook sdk添加到我的项目中时我有这样的错误,我已经尝试了很多方法来解决这个问题,但我没有.我该怎么办?
Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
> java.util.zip.ZipException: duplicate entry: bolts/AggregateException.class
Run Code Online (Sandbox Code Playgroud)
我的App gradle在下面
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion '21.1.2'
defaultConfig {
applicationId "com.example.myproject"
minSdkVersion 9
targetSdkVersion 21
versionCode 1
versionName "1.0"
multiDexEnabled = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile project(':facebook')
}
Run Code Online (Sandbox Code Playgroud)
这是facebook build.gradle
apply plugin: 'com.android.library'
repositories {
mavenCentral()
}
project.group …Run Code Online (Sandbox Code Playgroud) android facebook-android-sdk android-studio android-gradle-plugin
我在mac osx sierra上从unity构建apk文件时出现以下错误.在重新启动我的macbook之前,这也很好,但现在不行.
我在下面添加了错误详情:
注意:我正在使用facebook sdk.
Error: Error while saving blame file, build will continue
Error: The prefix "tools" for attribute "tools:overrideLibrary" associated with an element type "uses-sdk" is not bound.
UnityEditor.HostView:OnGUI()
Run Code Online (Sandbox Code Playgroud)
和:
AndroidSDKToolsException: Unable to merge android manifests. See the Console for more details.
UnityEditor.Android.AndroidSDKTools.DetectErrorsAndWarnings (System.String logMessages, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) …Run Code Online (Sandbox Code Playgroud) android unity-game-engine android-manifest facebook-unity-sdk
我想动态创建ui按钮,
我有一个预制件,
这是代码:
public class SFSConnect : MonoBehaviour {
SmartFox sfs;
public GameObject cnv1;
public GameObject potchPrf;
public Canvas fCanvas;
void Start () {
fCanvas = cnv1.GetComponent<Canvas> ();
Button ptf1 = potchPrf.GetComponent<Button> ();
Instantiate(ptf1,new Vector3 (0, 0, 10), Quaternion.identity);
potchPrf.transform.SetParent (fCanvas.transform);
}
}
Run Code Online (Sandbox Code Playgroud)
我尝试了数千个帖子,但什么也没发生
嗨,我想计算两个输入字段值,结果将显示在第三个输入字段中,所以我想在 ajax 页面中编写代码
<input id="a1" type="text" />
<input id="a2" type="text" onblur="Calculate();" />
<input id="a3" type="text" name="total_amt" value="" />
Run Code Online (Sandbox Code Playgroud)
这里 javascript 函数
<script>
function Calculate()
{
var resources = document.getElementById('a1').value;
var minutes = document.getElementById('a2').value;
document.getElementById('a3').value=parseInt(resources) * parseInt(minutes);
document.form1.submit();
}
</script>
Run Code Online (Sandbox Code Playgroud)
开始工作,但不工作,请帮助我
提前致谢
为什么这个循环是无限的当我尝试使用as3在flash中底部代码时,
for(var i:uint=10;i>=0;i--)
{
//some code
trace(i);
}
Run Code Online (Sandbox Code Playgroud)
这是输出;
10
9
8
7
6
5
4
3
2
1
0
4294967295
4294967294
4294967293
.
.
.
.
Run Code Online (Sandbox Code Playgroud)