Importing google-play-service library project to workspace issue
Try two way in Eclipse IDE:
1.) Import the library project into your Eclipse workspace.
Click File > Import,
select Android > Existing Android Code into Workspace, and browse to the copy of the library project to import it.
If project not visible with checkbox try next step as see below.
2.) Click
File > New > Other
select Android > Existing Android Code into Workspace, and browse to the copy of the library project to import it.
1.) Import the library project into your Eclipse workspace.
Click File > Import,
select Android > Existing Android Code into Workspace, and browse to the copy of the library project to import it.
If project not visible with checkbox try next step as see below.
2.) Click
File > New > Other
select Android > Existing Android Code into Workspace, and browse to the copy of the library project to import it.
396LW NO topic_id
AD
Další témata ....(Topics)
Cycle for in Java example
public class MainClass {
public static void main(String[] arg) {
String[] arrayOfString = { "Hello", "people", "hello", "world!" };
for (int i = 0; // start position , first cycle i == 0
i < arrayOfString.length; // if i < 4 (length of array) do loop
i++ // incrementation after cycle
){
System.out.println(arrayOfString[i]);
// i++ incrementation
}
}
}
Create file restartADB.bat in folder
c:\Program Files\Android\android-sdk-windows\platform-tools\
Write into restartADB.bat this code:
Save restartADB.bat file.
If you want restart adb.exe server, run restartADB.bat by double click on icon.
Next example:
[caption id="attachment_778" align="alignleft" width="300" caption="ADB server restart by command line"][/caption]
Try restart ADB if this or similar errors:
Emulator] emulator: emulator window was out of view and was recentred
c:\Program Files\Android\android-sdk-windows\platform-tools\
Write into restartADB.bat this code:
adb kill-server && adb start-server
pause
Save restartADB.bat file.
If you want restart adb.exe server, run restartADB.bat by double click on icon.
Next example:
- Open Total Commander
- Open folder with adb.exe usually in
c:\Program Files\Android\android-sdk-windows\platform-tools\ - Put into command line command: adb kill-server && adb start-server and press Enter
[caption id="attachment_778" align="alignleft" width="300" caption="ADB server restart by command line"][/caption]
Try restart ADB if this or similar errors:
Emulator] emulator: emulator window was out of view and was recentred
RectF, drawRoundRect(),
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(new SampleView(this));
}
private static class SampleView extends View {
// CONSTRUCTOR
public SampleView(Context context) {
super(context);
setFocusable(true);
}
@Override
protected void onDraw(Canvas canvas) {
Paint paint = new Paint();
canvas.drawColor(Color.GREEN);
Bitmap b = Bitmap.createBitmap(200, 200, Bitmap.Config.ALPHA_8);
Canvas c = new Canvas(b);
RectF rectF = new RectF();
rectF.set(5,5,150,150);
c.drawRoundRect(rectF, 10, 10, paint);
paint.setColor(Color.RED);
canvas.drawBitmap(b, 10,10, paint);
}
}
}
String sFileContent = readFile("myfile.txt",StandardCharsets.UTF_8);
static String readFile(String path, Charset encoding)
throws IOException
{
byte[] encoded = Files.readAllBytes(Paths.get(path));
return encoding.decode(ByteBuffer.wrap(encoded)).toString();
}
// write file
String sOut = "text blah hello world etc.";
writeToFile(sOut"someName.txt");
static void writeToFile(String sB,String name) {
String folder = ("c:\\folder\");
File f = new File(folder+ name);
BufferedWriter writer = null;
writer = new BufferedWriter( new OutputStreamWriter(
new FileOutputStream( folder+name),"UTF-8"));
writer.write( sB);
if ( writer != null)
writer.close( );
}
Check this in XML file if use singleLine
singleLine change to maxLines (1 if singleLine)
declare inputType
singleLine change to maxLines (1 if singleLine)
declare inputType
android:maxLines="1"
android:inputType="text"
Editace: 2014-09-10 16:52:48
Počet článků v kategorii: 396
Url:importing-google-play-service-library-project-to-workspace-issue