Adb server problem
by Atish » Thu, 18 Dec 2008 01:26:39 GMT
Sponsored Links
Hi i am new to android.Sometimes while running the emulator i get this
error.I don't know what to do.I restart eclipse 3/4 times.Sometimes it
works sometimes it takes even 15/20 times.What is permanent solution
for this???i even tried kill adb server by adb kill-server.But it was
of no use.
Connection Failure when starting to monitor device 'emulator-5554' :
device (emulator-5554) request rejected:
[2008-12-17 18:13:30 - DeviceMonitor]Failed to start monitoring
emulator-5554
[2008-12-17 18:13:31 - DeviceMonitor]Adb connection Error:An existing
connection was forcibly closed by the remote host
[2008-12-17 18:13:32 - DeviceMonitor]Connection attempts: 1
[2008-12-17 18:13:34 - DeviceMonitor]Connection attempts: 2
--~--~---------~--~----~------------~-------~--~----~
Other Threads
1. Is TextView supposed to be able to scroll its contents?
It was my understanding that even though TextView is not a ScrollView,
it has scrolling functionality built-in.
However, I'm not able to scroll the contents of a TextView (that's on
1.6). I've reduced my code to the most trivial example:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:orientation="vertical">
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:inputType="text|textMultiLine"
android:singleLine="false"
/>
</LinearLayout>
I then defined a really long string for testing, which I set on this
text view using setText().
The text is too long for the TextView, but there is no way to scroll
it. So do I need to wrap it in a ScrollView after all?
Cheers,
Matthias
--
2. SoundPool problem
Hello,
I'm using a SoundPool for playing my game sound effects.
It all worked fine until I checked it on the new SDK 2.0.
the sounds are not played and I'm getting in my log:
"SoundPool Sample channel count (0) out of range"
right after the playerPool.load (see the code).
does any one encountered with this problem?
here is my code:
package j2ab.android.rpcapp.utils;
import android.content.Context;
import android.media.AudioManager;
import android.media.SoundPool;
import j2ab.android.rpcapp.R;
public class SoundManager
{
private static boolean isSoundEnabled = true;
private static final int[] PLAYERS_RES_IDS = {R.raw.snd1,
R.raw.snd2,R.raw.snd3};
/**
* Player priority in case of ONE_PLAYER. the highest priority is 0.
*/
private static final int[] PLAYERS_PRIORITY = {1, 1, 1};
private int[] idToStream;
private SoundPool playerPool;
public SoundManager(Context context, int maxStreams) {
playerPool = new SoundPool(maxStreams,
AudioManager.STREAM_MUSIC,
0);
idToStream = new int[PLAYERS_RES_IDS.length];
for (int i = 0; i < idToStream.length; i++){
idToStream[i] = playerPool.load(context,
PLAYERS_RES_IDS[i],
PLAYERS_PRIORITY[i]);
}
}
public int play(int playerId, boolean interrupt) {
if(isSoundEnabled){
int status = playerPool.play(idToStream[playerId],
0.99f, 0.99f, 0,
0, 1);
if(status == 0)
MyLog.printLog("", "cant play a sound !!!!!!!!
" + playerId);
return status;
}
return 0;
}
public void stopPlayer(int playerId, boolean resetMediaTime) {
if(resetMediaTime){
playerPool.stop(idToStream[playerId]);
}
else{
playerPool.pause(idToStream[playerId]);
}
}
public void onDispose() {
playerPool.release();
}
}
BTW
the emulator managed to play sound using MediaPlayer, but I don't want
to use a low level sound management.
Tanks
Yanir
--
3. twitter integration for android
4. CTS performance test and LOCAL_CERTIFICATE
5. How to move homescreen focus to specific widget?
6. Ok to measure widgets before display?
7. very urgent