본문 바로가기

[android] Lollipop (v5.x) service 오류 targetSdkVersion을 21로 맞추고 빌드를 하면 Process: com.myapp, PID: 6073 java.lang.IllegalArgumentException: Service Intent must be explicit: 위와 같은 오류가 발생한다.뭘 명확하게 하라는건데, 오류가 난 곳을 보면 Service의 Action을 특정 문자열로 사용하고 있을 것이다.이걸 특정 패키지를 지정해주면 오류가 없어진다.'어느 패키지(앱) 건지 지정해라.' 정도로 해석하면 되겠다.intent.setPackage("com.myapp")을 추가 특정 문자열로 하면 namespace관련 오류 발생 가능성이 있나보다. 더보기
[android] sqlite 사용하기 SQLite를 사용하기위해서는 1. SQLiteOpenHelper 클래스 생성2. 생성자에 Database name를 전달함으로써 SQLiteOpenHelper안에서 서 SQLiteDatabase.openDatabase() 또는 mContext.openOrCreateDatabase()로 Database를 생성또는 다시 연다.4. Table 생성3. DML 구현 끗. SQLite를 사용하는데에 SQLite 클래스 SQLiteOpenHelperSQLite의 생성자는 SQLiteOpenHelper(Context context, String databaseName, CursorFactory factory, int version)onCreate()에서 SQLiteDatabase 인스턴스로 table 생성 쿼리를 .. 더보기
[android] google analytics froyo 문제 Lollipop 버전에서 Google Analytics가 죽는 문제가 발생16797-16885/kr.co.tictocplus E/AndroidRuntime﹕ FATAL EXCEPTION: GAThread Process: PID: 16797 java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.google.android.gms.analytics.service.START (has extras) } at android.app.ContextImpl.validateServiceIntent(ContextImpl.java:1674) at android.app.ContextImpl.bindServiceCommon(Con.. 더보기