在开发过程中,我误以为抱怨gradle插件太旧(是2.0.0-alpha3,改为2.0.0-alpha5并且工作.Hurray!).然后它抱怨distributionUrl
指向一个过时的软件.我也克服了这一点.现在谷歌把我钉在了一起
Error:Execution failed for task ':app:buildInfoDebugLoader'.
> Exception while loading build-info.xml : null
Run Code Online (Sandbox Code Playgroud)
无效+重启没有做到这一点.接下来是什么 ?
不要单独右击每一个,勾选"从构建中排除"等,以及如何将它们整体包括在内?
谢谢
但我正在同步"名册"对象,无论它到处都是新的.怎么会 ?
违规代码:
public Roster getRoster() {
if (roster == null) {
return null;
}
if (!roster.rosterInitialized) {
try {
synchronized (roster) {
roster.reload();
long waitTime = SmackConfiguration.getPacketReplyTimeout();
long start = System.currentTimeMillis();
while (!roster.rosterInitialized) {
if (waitTime <= 0) {
break;
}
roster.wait(waitTime);
long now = System.currentTimeMillis();
waitTime -= now - start;
start = now;
}
}
}
catch (InterruptedException ie) {
// Ignore.
}
}
return roster;
}
Run Code Online (Sandbox Code Playgroud) 作家:
socket.setSendBufferSize(1);
socket.setTcpNoDelay(true);
writer = new BufferedWriter(
new OutputStreamWriter(socket.getOutputStream(), "UTF-8"));
Run Code Online (Sandbox Code Playgroud)
用法如下:
try {
writer.write(packet.toXML());
writer.flush();
...
}
catch (Exception ioe){
if (!done) {
done = true;
...
}
}
Run Code Online (Sandbox Code Playgroud)
这是客户端代码.当它的服务器断开套接字(也是java代码)时,客户端如何才会在5-10分钟后抛出?它是否应该在第一次尝试写入死连接时抛出?
谢谢
编辑:
关闭服务器后,这里是TCP状态:
tcp 0 0 server:443 client:50283 FIN_WAIT2
tcp4 0 0 cient.50283 server.443 CLOSE_WAIT
Run Code Online (Sandbox Code Playgroud)
EDIT2:
客户端是一个Android应用程序.从电话中跑出来,写入的第二个数据包导致抛出.从模拟器(下面的Mac)跑出第四个write()将抛出.
我听说,翻译API将被收取,但究竟是什么阻止我们形成使用免费的谷歌翻译服务在这里免费的吗?否则,免费服务有哪些局限性?
根据官方网站,Android支持从版本1.6开始的前向声明.
在manifest.xml中将min SDK和目标SDK要求都调整为'4'之后,eclipse中的布局编辑器仍在抱怨相对布局中的未知声明:
<xml>
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/ChkBoxSaveuser"
android:text="@string/options_saveuser"
android:layout_above="@id/ChkBoxSavePwd"
android:layout_marginTop="20dp"
android:layout_alignLeft="@id/EditTxtServer"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/EditTxtServer"
android:maxLines="1"
android:minWidth="200dp"
android:layout_marginTop="10dp"
android:layout_gravity="center_horizontal"
android:layout_above="@id/ChkBoxSaveuser"/>
</xml>
Run Code Online (Sandbox Code Playgroud)
在此行找到多个注释:
错误错误:找不到与给定名称匹配的资源(在'layout_above'中,值为'@id/ChkBoxSavePwd').
错误错误:找不到与给定名称匹配的资源(在'layout_alignLeft'中,值为'@id/EditTxtServer').
干净/重建没有帮助..任何人偶然发现这件事?
eclipse android forward-declaration relativelayout android-sdk-1.6
我在Adnroid 2.2 SDK上,无法在MultiUserChat类中获取我的静态块来执行.我试图强制加载它
try
{
String qual = MultiUserChat.class.getName();
ClassLoader.getSystemClassLoader().loadClass(qual);
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
Run Code Online (Sandbox Code Playgroud)
它总是击中捕获块.'qual'获得该类的有效名称......它可以是什么?
一劳永逸地禁止编辑器(源代码编辑器)窗口混合我的'DDMS'视角.怎么做 ?
编辑:适用于Java开发人员的Eclipse IDE
版本:1.2.2.20100216-1730 Build id:20100218-1602
唯一可用的更新是针对Mylin和Android的东西
我正进入(状态
java.io.FileNotFoundException: /sdcard/Img_1316563834614.jpg (Permission denied)
Run Code Online (Sandbox Code Playgroud)
在尝试之后
mRAF = new RandomAccessFile(mFullPath, "rws");
Run Code Online (Sandbox Code Playgroud)
其中mFullPath是/sdcard/image6456.jpg,/mnt/sdcard/image3579.jpg,file:///sdcard/image34567.jpg等.没有任何作用.已经有了
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Run Code Online (Sandbox Code Playgroud)
AndroidManifest.xml中的行
我检查过路径/ mnt/sdcard实际上是在那里.也是电话
getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);
Run Code Online (Sandbox Code Playgroud)
发出null.我不应该怀疑......
我错过了什么?
谢谢
拿这个基类:
public abstract class XMPPSubservice
{
protected XMPPService mTheService;
protected XMPPSubservice(Context context)
{
Intent intent = new Intent(context, XMPPService.class);
context.startService(intent);
}
public void onServiceInstance(XMPPService service) {
// TODO Auto-generated method stub
mTheService = service;
}
}
Run Code Online (Sandbox Code Playgroud)
而这个派生类:
public class PublicDataSubservice extends XMPPSubservice
{
private final SomeObject mObj = new SomeObject();
public PublicDataSubservice(Context context) {
super(context);
}
@Override
public void onServiceInstance(XMPPService service)
{
super.onServiceInstance(service);
mObj.doSomethingWith(mTheService);
}
}
Run Code Online (Sandbox Code Playgroud)
目标是只调用mObj.doSomethingWith(mTheService); mTheService生效后(发生在基类中).事情是它总是在mObj线上吐出NPE.我能理解为什么会这样,但它对我来说看起来很不可思议.那么这是DVM的一个bug还是一个功能?JVM怎么样?
下面是所涉及的测试代码:
// When the client needs to fetch data from the cloud, this method will be called.
// The FakeMirrorDataMover class does the actual work of copying files from
// the "cloud" to the "client" and updating the transfer status along the way.
void CALLBACK FakeCloudProvider::OnFetchData(
_In_ CONST CF_CALLBACK_INFO* callbackInfo,
_In_ CONST CF_CALLBACK_PARAMETERS* callbackParameters)
{
//FileCopierWithProgress::CopyFromServerToClient(callbackInfo, callbackParameters, ProviderFolderLocations::GetServerFolder());
const UINT CHUNKSIZE = 48 * 1024 * 1024;
UINT len;
LONG64 offset = callbackParameters->FetchData.RequiredFileOffset.QuadPart;
LONG64 requiredLength = …
Run Code Online (Sandbox Code Playgroud) Run Code Online (Sandbox Code Playgroud)** Reason for termination = ** {badarg,[{erlang,'++',[<<>>,"</after></set></query></iq>"]}, {geoloc,get_nearby,1},
方法是:
get_nearby({_Pid, DynVars})->
%Last = ts_dynvars:lookup(last, DynVars),
Last = lists:keysearch(last,1,DynVars),
{ok, Rad} = ts_dynvars:lookup(rad,DynVars),
{ok, Lat} = ts_dynvars:lookup(lat,DynVars),
{ok, Lon} = ts_dynvars:lookup(lon,DynVars),
if is_tuple(Last) ->
{value,{Key,After}} = Last,
if length(After) == 0 ->
After2 = "0";
true ->
After2 = After
end,
"<iq id=\"" ++ common:get_random_string(5,"abcdefghijklmnopqrstuvwxyz0123456789-+=") ++ "\" xmlns=\"http://xmpp.xgate.com.hk/plugins\" to=\"xmpp.xgate.hk.com\" type=\"get\"><query xmlns=\"jabber:iq:geoloc\"><geoloc><lat>" ++ Lat ++ "</lat><lon>" ++ Lon ++ "</lon><radius>" ++ Rad ++ "</radius></geoloc><set xmlns=\"http://jabber.org/protocol/rsm\"><max>" ++ integer_to_list(ran_max()) ++ "</max><after>" ++ After2 ++ …
Run Code Online (Sandbox Code Playgroud)