忍者ブログ
[3]  [4]  [5]  [6]  [7]  [8]  [9]  [10]  [11]  [12]  [13
×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

Android studioでディレクトリが作れない

android6.0以上ではManifestに以下を記載しても
ディレクトリができない

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

この場合、
設定>>アプリ>>で該当のアプリを探して
ストレージの権限をONにすればOK
 

拍手

PR
・Eclipse+JAVAで開発したAndroidソースをAndroidStudio3.4へ移行した
注意点をメモしておく
 (shift-jisで作成したソースからの変換)


・AndroidManifest
    <uses-sdkをすべて削除
  ソースコード内にshift-jisの全角スペースがある場合は、
  APPのbuildでその行がエラーとして表示されるがAndroidManifestとは
  表示されない


・エンコーディング すべてutf-8にする
 File >> Settings >> Editer >> File encoding  project すべてUTF8に

・bilde.Gradleを修正project google()を追加
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
・bilde.Gdadle model compleをimplementationに
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "com.XXXXXX.AppYYYYYActivity"
minSdkVersion 15
targetSdkVersion 28
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
・ここから面倒だが
  EclipseのJAVAソースをNotoPad+でオープン
  エンコードをすべてUTF-8にしておく     android studioにコピーペースト 画面下がUFT8になっている事を
  確認
・projectをコピペした時はClearProjectをわすれずに
・ディレクトリができない
 セキュリティの強化でAndrodi6.0以上では、設定>>アプリ>>権限で
 ストレージをONにしておく事
 無論Manifestでの定義も忘れすずに

・WiFiが接続やステータスが正常に表示されない
 manifestファイルに記載追加が必要


・ビルドの打ち切りと再実行
 長時間gradleが終わらないときはいったんTry Againを事項

・ADTはbiosでIntel/VTを有効にWindowsではHyper-Vを無効にする



 

拍手

AndroidStudio初期設定だがバージョンアップの改変が多く
今のところ

以下のURLがわかりやすい

Android Studioの環境設定



https://qiita.com/toshi-click/items/0223a6f8b50cf66c89f9

ソースのEDIT encodingはUTF-8に

これにプラスしてご本家の
https://developer.android.com/studio/intro/studio-config.html

最大ヒープサイズ 
並列コンパイルを有効にしない

Instant Run 用にプロジェクトを構成して最適化する
https://developer.android.com/studio/run/index.html#set-up-ir

  1. [Settings] または [Preferences] ダイアログを開きます。
  2. [Build, Execution, Deployment] > [Instant Run] を選択し、図 3 に示す [Update Project





拍手

・Eclipse+JAVAで開発したAndroidソースをAndroidStudioへ移行した
注意点をメモしておく

・AndroidManifest
    <uses-sdkをすべて削除

・エンコーディング utf-8>>shift3.1j
 File >> Settings >> Editer >> File encoding  project globale共に3.1Jにする
 特にProjectを設定しないとコンパイル時にソースのコメント句がすべて
 エラーになる

・bilde.Gradleを修正project google()を追加
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
}
}

allprojects {
repositories {
google()
jcenter()
}
}
・bilde.Gdadle model compleをimplementationに
apply plugin: 'com.android.application'

android {
compileSdkVersion 28
buildToolsVersion "28.0.3"

defaultConfig {
applicationId "com.XXXXXX.AppYYYYYActivity"
minSdkVersion 15
targetSdkVersion 28
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}


dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
・ビルドの打ち切りと再実行
 長時間gradleが終わらないときはいったんTry Againを事項

・ADTはbiosでIntel/VTを有効にWindowsではHyper-Vを無効にする



 

拍手

特定のPCでWindowsUpdate後にネットワークプリンターが全て認識できなくなった

設定>>デバイス>>プリンター設定でポートの構成を選ぶとエラーになる
トラブルシューティングでも復帰しない

諦めて、ドライバーを削除し再インストールすると復帰したが、再起動すると
なぜか最後にインストールしたプリンタドライバー以外は、認識できない
状態になる。

多分ネットワーク系のセキィリティが変更(改悪)されたようである。

WindowsUpdateの都度、トラブルばかり、Linuxのように安定バージョン
で一定期間使用できるようにして欲しい

そもそもWindowsUpdateが毎回大量に必要なほどWindwosOSは問題ある
製品なのか。

そういえばwin95の時にその完成度の低さでビルゲイツさんと西さんが
大げんかしたのは古川さんの著書で暴露している。
結局windowsはwin95系を諦めて旧バックスグループによるwinNT系で
生き残った経緯がある。

windowsにLinuxエンジンを組み込んでいるが、これと同じ事をする
ようなのかな





拍手

カレンダー
03 2025/04 05
S M T W T F S
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
フリーエリア
最新CM
[03/10 DORA]
最新TB
プロフィール
HN:
dorabu
性別:
非公開
バーコード
ブログ内検索
P R
Copyright © ドラブーのアンドロイドとIoTなブログ All rights reserved. / Template by 四季. / Material by てんせん.

忍者ブログ [PR]