목록2019/01 (8)
SPRING :: NOTE
안드로이드 레이아웃을 투명화 하는 작업 중 나타난 오류때문에 몇시간을 낭비했다.인터넷에 널리고 널린 소스는 Manifast.xml에 Style에서 추가 한 사용자 테마를 넣는건데죈종일 아래와 같은 오류만 뿜어댔다. You need to use a Theme.AppCompat theme (or descendant) with this activity결론적으로는... AppCompatActivity 써서 나는 오류였다.Style.xml에서 Theme 새로 생성할 때 Parent에 AppComat을 받아 만들면 에러가 안난다...
OnCreate 안에 Setcontent가 끝나는 시점에 넣어준다.DisplayMetrics dm = getApplicationContext().getResources().getDisplayMetrics(); int width = (int) (dm.widthPixels * 0.7); //Display 사이즈의 70% //int height = (int) (dm.heightPixels * 0.9); //Display 사이즈의 90% getWindow().getAttributes().width = width; getWindow().getAttributes().gravity = Gravity.RIGHT; getWindow().setBackgroundDrawable(new ColorDrawable(Color.G..
Error running 'app': Unable to open debugger port (localhost:8700): java.io.IOException "handshake failed - connection prematurally closed" 그냥 안드로이드 스튜디오 리붓하자.
var degrees2meters = function(lon,lat) { var x = lon * 20037508.34 / 180; var y = Math.log(Math.tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180); y = y * 20037508.34 / 180; return [x, y] } x= -77.035974 y = 38.898717 console.log(degrees2meters(x,y)) // should result in: -8575605.398444, 4707174.018280
아래와 같이 에러가 났을 때,ERROR: Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See http://b.android.com/95744 for details. This warning can be disabled by adding the line 'android.overridePathCheck=true' to gradle.properties file in the project directory. 그냥 프로젝트 경로에 안드로이드 스튜디오가 지원하지 않는 한글이 있어서 ..
안드로이드 스튜디오를 업데이트 했는데 다음과 같은에러가 발생하고 빌드가 안됨. The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.0 and higher. The following dependencies do not satisfy the required version: root project 'GCS' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71 코틀린 버전이 안맞아서 그렇다고 함. 안드로이드 프로젝트 리스트에서build.gradle(Projectg : xxx)로 이동 buildscript에서 다음을 변경 buildscript { ext.kotlin_version = '1.2.7..
보통 웹사이트를 돌아다니다 보면 복사방지가 걸려있어,블럭지정도 안되고 텍스트 복사도 안될 때 복사방법 여러 프로그램이 있지만 프로그램을 설치해야한다는 단점이 있다. 그럴때는 인터넷 익스플로러를 키고(윈도우 기본 내장되어있음) 도구->인터넷 옵션->보안->[이 영역에 적용할 보안 수준]을 높음으로 설정 후 다시시작 익스플로러로 본 페이지를 띄운다음 복사하시면 복사 가능합니다.
예전에 안드로이드를 하긴 했지만.. 시간이 너무 오래 지나서 안드로이드도 다 까먹고, 워낙 바뀐게 많다 보니 애를 많이먹었다. 안드로이드 API 몇버전이더라... 이제 소켓통신을 할 때 쓰레드를 생성해서 통신하는것 아니면 에러가 난다고 해서 몸소 겪었다. 하루종일... 그래서... 인터넷에서 찾은 js 소켓 통신으로 SendMessage에 Thread만 추가하여 클래스를 만들었다. 아래는 원본 링크다. 설명이 잘 되어있으니 한번 방문하는것도 좋을듯. 원본 링크 클래스를 구현하고 Activity에서 new 해주면 된다. TcpClient.java import android.util.Log; import java.io.BufferedReader; import java.io.IOException; import..