Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.
ターミナルから下記を実行
・sudo xcodebuild -license
・enter 押す
・一番したまでスクロール
・agree を入力してenter
でOK
技術的な知見や日々の記録、日常の些細な変化などを綴る雑記ブログです。専門的な技術解説から日記のようなライトな話題まで、特定のジャンルに縛られず、気になったことや面白いと感じた出来事を幅広く発信しています。筆者の視点で切り取った多様なコンテンツが楽しめる、自由な雑記空間を目指しています。
for ( int i = 0 ; i <= 5 ; i++ ){//処理}
| Version | Codename | API | Distribution |
|---|---|---|---|
| 2.2 | Froyo | 8 | 0.2% |
| 2.3.3 - 2.3.7 | Gingerbread | 10 | 3.8% |
| 4.0.3 - 4.0.4 | Ice Cream Sandwich | 15 | 3.4% |
| 4.1.x | Jelly Bean | 16 | 11.4% |
| 4.2.x | 17 | 14.5% | |
| 4.3 | 18 | 4.3% | |
| 4.4 | KitKat | 19 | 38.9% |
| 5.0 | Lollipop | 21 | 15.6% |
| 5.1 | 22 | 7.9% |
public class PdfCreator {
public static void createPdf(String filePath) {
// PDFドキュメントの作成
PdfDocument document = new PdfDocument();
// ページ情報の設定 (幅: 100, 高さ: 100, ページ番号: 1)
PageInfo pageInfo = new PageInfo.Builder(100, 100, 1).create();
// ページの開始
Page page = document.startPage(pageInfo);
// キャンバスの取得
Canvas canvas = page.getCanvas();
// ペイントの設定
Paint paint = new Paint();
// テキストの描画 (x座標: 0, y座標: 3)
canvas.drawText("aaa", 0, 3, paint);
// ページの終了
document.finishPage(page);
// ファイルの保存
File file = new File(filePath);
try (OutputStream out = new BufferedOutputStream(new FileOutputStream(file))) {
document.writeTo(out);
} catch (IOException e) {
e.printStackTrace();
} finally {
// ドキュメントのクローズ
document.close();
}
}
}