레이블이 Android인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Android인 게시물을 표시합니다. 모든 게시물 표시

2016년 9월 18일 일요일

Unsupported major.minor version 52.0

Errors occurred during the build.
Errors running builder 'Android Package Builder' on project 'RecodiaPlayer'.
com/android/dx/command/dexer/Main : Unsupported major.minor version 52.0


solved :
jre1.8.0_102 installed

2016년 3월 7일 월요일

format a floating for __android_log_print

__android_log_print("test=%g", (float)f);

2015년 12월 7일 월요일

android ndk version check

RELEASE.TXT with Root Dir

2015년 11월 25일 수요일

not build with android.mk

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE    := ffmpeg
LOCAL_SRC_FILES := libffmpeg.so
include $(PREBUILT_SHARED_LIBRARY)

2015년 11월 24일 화요일

use echo print with android.mk

$(warning [warning] this the warning msg)

$(info [info] $(LOCAL_PATH))

2015년 9월 1일 화요일

splash activity with adnroid

SplashActivity.java

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

public class SplashActivity extends Activity {

// Splash screen timer
   private static int SPLASH_TIME_OUT = 3000;

   @Override
   protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_splash);

      new Handler().postDelayed(new Runnable() {

         @Override
         public void run() {
            // This method will be executed once the timer is over
            // Start your app main activity
            Intent i = new Intent(SplashActivity.this, MainActivity.class);
            startActivity(i);
           
            finish();
         }
      }, SPLASH_TIME_OUT);
   }
}

AndroidManifest.xml

        <!-- Splash screen -->
        <activity            
            android:name=".SplashActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.Black.NoTitleBar" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
               
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAINACTIVITY" />
                <category android:name="android.intent.category.MAIN" />
            </intent-filter>
        </activity>  


2015년 8월 21일 금요일

appcompat_v7 errors

Set Project Build Path as Android 5.0 (API level 21)

Set the project target as : target=android-21

No compatible targets where found

No compatible targets where found. Do you wish to add new Android Virtual

install by Android SDK Manager
"Google USB Driver"

if samsung phone, install driver
http://local.sec.samsung.com/comLocal/support/down/kies_main.do?kind=usb

2015년 8월 10일 월요일

adt plugin install for eclipse

https://dl-ssl.google.com/android/eclipse/

http://developer.android.com/sdk/index.html ==> download

** JAVA_HOME Envirenment Setting

Android SDK install

2015년 6월 29일 월요일

unable to resolve target 'android'

Unable to resolve target 'android-1' - (Android 1.0) change the "default.properties"
Unable to resolve target 'android-2' - (Android 1.1) change the "default.properties"
Unable to resolve target 'android-3' - install SDK Platform Android 1.5
Unable to resolve target 'android-4' - install SDK Platform Android 1.6
Unable to resolve target 'android-5' - install SDK Platform Android 2.0
Unable to resolve target 'android-6' - install SDK Platform Android 2.0.1
Unable to resolve target 'android-7' - install SDK Platform Android 2.1
Unable to resolve target 'android-8' - install SDK Platform Android 2.2
Unable to resolve target 'android-9' - install SDK Platform Android 2.3
Unable to resolve target 'android-10' - install SDK Platform Android 2.3.3
Unable to resolve target 'android-11' - install SDK Platform Android 3.0
Unable to resolve target 'android-12' - install SDK Platform Android 3.1
Unable to resolve target 'android-13' - install SDK Platform Android 3.2
Unable to resolve target 'android-14' - install SDK Platform Android 4.0
Unable to resolve target 'android-15' - install SDK Platform Android 4.0.3
Unable to resolve target 'android-16' - install SDK Platform Android 4.1
Unable to resolve target 'android-17' - install SDK Platform Android 4.2
Unable to resolve target 'android-18' - install SDK Platform Android 4.3
Unable to resolve target 'android-19' - install SDK Platform Android 4.4
Unable to resolve target 'android-20' - (Android 4.4w) change the "default.properties"
Unable to resolve target 'android-21' - install SDK Platform Android 5.0.1

2015년 4월 30일 목요일

android:largeHeap

<application android:icon="@drawable/icon"
android:label="@string/app_name"
        android:theme="@style/AppTheme"
        android:largeHeap="true"



여려가지 이유에서 android bitmap 처리를 하다보면, 대책없이 dalvic 에서 out of memory 가 나서 app 이 crash 되는 경우가 있다. AndroidManifest.xml 추가

android:largeHeap
Whether your application's processes should be created with a large Dalvik heap. This applies to all processes created for the application. It only applies to the first application loaded into a process; if you're using a shared user ID to allow multiple applications to use a process, they all must use this option consistently or they will have unpredictable results.
Most apps should not need this and should instead focus on reducing their overall memory usage for improved performance. Enabling this also does not guarantee a fixed increase in available memory, because some devices are constrained by their total available memory.
To query the available memory size at runtime, use the methods getMemoryClass() orgetLargeMemoryClass().

ref : http://developer.android.com/guide/topics/manifest/application-element.html

2015년 4월 29일 수요일

icon size for android app

Low Density Per Inch (ldpi) - 36 x 36 pixel
Medium Density Per Inch (mdpi) - 48 x 48 pixel
High Density Per Inch (hdpi) - 72 x 72 pixel
eXtra High Density Per Inch (xhdpi) - 96 x 96 pixel
eXtra eXtra High Density Per Inch (xxhdpi) - 144 x 144 pixel

2015년 4월 4일 토요일

migration adt to android studio

1. adt 로 일단 빌드/실행까지 성공해야, android studio 에서 작업 할 수 있음, 안 그럼 app module 을 load 할 수 없음
2. 소스내에서 android ndk 가 필요한 경우, ndk 를 설치해도 다음과 같은 오류가 발생
Error:(283) *** Android NDK: Aborting . Stop.
Error:Execution failed for task ':app:compileDebugNdk'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/pointermans/Documents/Work/android_ndk/android-ndk-r10d/ndk-build'' finished with non-zero exit value 2
3. build.gradle ( module ) 에 다음을 추가가 ( android 태그 안에 두어야 함 )
sourceSets.main {
jni.srcDirs = []
jniLibs.srcDir 'src/main/libs'
}

2014년 4월 30일 수요일

get all keys and values of SharedPreferences

            SharedPreferences prefb = getSharedPreferences(getResources().getString(R.string.app_name), Context.MODE_PRIVATE);
            Map<String,?> keys = prefb.getAll();

            for (Map.Entry<String,?> entry : keys.entrySet()){
                Log.d(TAG, "SharedPreferences::" + entry.getKey() + "::" + entry.getValue().toString());
            }

2014년 4월 17일 목요일

android release packaging by the console

./gradlew clean assembleRelease

/Users/pointermans/Documents/Work/adt-bundle-mac-x86_64-20140321/sdk/platform-tools/adb uninstall com.iteras.iGen

/Users/pointermans/Documents/Work/adt-bundle-mac-x86_64-20140321/sdk/platform-tools/adb install -r  app/build/outputs/apk/app-release.apk

2014년 2월 16일 일요일

native lib 를 android studio 에 적용하는 방법

[ Envirenment ]

- Android Studio 0.4.4


[ Method ]

- 내 프로젝트에 lib 폴더를 생성해서 so 파일들이 들어 있는 armeabi, armeabi-v7a, mips, x86 등 모두를 Copy

- 내 프로젝트의 build.gradle 파일에 다음을 추 가

dependencies 안에 아래를 추가  
compile fileTree(dir: "$buildDir/native-libs", include: 'native-libs.jar')

compile fileTree(dir: 'lib', include: '*.jar')
task nativeLibsToJar(type: Zip, description: 'create a jar archive of the native libs') {
    destinationDir file("$buildDir/native-libs")
    baseName 'native-libs'
    extension 'jar'
    from fileTree(dir: 'lib', include: '**/*.so')
    into 'lib/'
}

tasks.withType(Compile) {
    compileTask -> compileTask.dependsOn(nativeLibsToJar)
}

- Source Code 에서는 아래같이 해당 lib 를 load 한다
    static
    {
        System.loadLibrary("libname");
    }

- rebuild project