[gradle version 정보 가져오기]
String versionCode = BuildConfig.VERSION_NAME;
text1.setText("幸運のMiniLoto番号 発生機"+versionCode);
[string xml 에서 가져오기]
String versionCode = BuildConfig.VERSION_NAME;
String app_name = getString(R.string.app_name);
2017년 9월 2일 토요일
proguard 설정
-optimizationpasses 5
#When not preverifing in a case-insensitive filing system, such as Windows. Because this tool unpacks your processed jars, you should then use:
-dontusemixedcaseclassnames
#Specifies not to ignore non-public library classes. As of version 4.5, this is the default setting
-dontskipnonpubliclibraryclasses
#Preverification is irrelevant for the dex compiler and the Dalvik VM, so we can switch it off with the -dontpreverify option.
-dontpreverify
#Specifies to write out some more information during processing. If the program terminates with an exception, this option will print out the entire stack trace, instead of just the exception message.
-verbose
#The -optimizations option disables some arithmetic simplifications that Dalvik 1.0 and 1.5 can't handle. Note that the Dalvik VM also can't handle aggressive overloading (of static fields).
#To understand or change this check http://proguard.sourceforge.net/index.html#/manual/optimizations.html
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keep public class org.jsoup.** {
public *;
}
gradle
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
layout
#When not preverifing in a case-insensitive filing system, such as Windows. Because this tool unpacks your processed jars, you should then use:
-dontusemixedcaseclassnames
#Specifies not to ignore non-public library classes. As of version 4.5, this is the default setting
-dontskipnonpubliclibraryclasses
#Preverification is irrelevant for the dex compiler and the Dalvik VM, so we can switch it off with the -dontpreverify option.
-dontpreverify
#Specifies to write out some more information during processing. If the program terminates with an exception, this option will print out the entire stack trace, instead of just the exception message.
-verbose
#The -optimizations option disables some arithmetic simplifications that Dalvik 1.0 and 1.5 can't handle. Note that the Dalvik VM also can't handle aggressive overloading (of static fields).
#To understand or change this check http://proguard.sourceforge.net/index.html#/manual/optimizations.html
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keep public class org.jsoup.** {
public *;
}
gradle
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
layout
tools:shrinkMode="strict">
android network to check
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ConnectivityManager manager = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo mobile = manager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); NetworkInfo wifi = manager.getNetworkInfo(ConnectivityManager.TYPE_WIFI); // wifi 또는 모바일 네트워크 어느 하나라도 연결이 되어있다면, if (wifi.isConnected() || mobile.isConnected()) { setContentView(R.layout.activity_main); Log.d(TAG,"dfdf"); new miniloto().execute(); } else { AlertDialog.Builder ad = new AlertDialog.Builder(MainActivity.this); { setContentView(R.layout.activity_main); Log.d(TAG,"afaf"); // wtext4.setText("네트워크 통신 에러"); ad.setTitle("Network Error!"); ad.setMessage("Your Network is Somthing Wrong!!"); ad.setPositiveButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { dialogInterface.dismiss(); wtext1.setText("Network Error!"); wtext2.setText("Please ON Wifi & ON Mobile Network"); wtext3.setText(""); wtext4.setText(""); wtext5.setText(""); wtext6.setText("If you To check your Miniloto Number "); return; } }); Log.d(TAG,"afaf"); ad.show(); } }
피드 구독하기:
글 (Atom)
-
Rosewell 사건의 유일한 생존자인 외계인 Airl에 관한 이야기를 전해 드리고자 합니다. 이책은 우리에게 정말 귀한 정보 와 통찰력을 주며, 왜 이렇게 삶이란 것이 깊은 고뇌를 동반하는 것인 과정인지 근본적인 대답을 해주며, 죽는다는 것이 어렵...
-
아치 리눅스 한글 간단 사용기 한글 입력기로 ibus 사용 하기로 한다. nabi 도 좋긴 한데 구글 크롬과 심각한 버그로 쓰기 힘든 상태 이므로 nabi 는 패스 하기로 아이뻐스 설치 pacman -S ibus ibus-hangul ...
-
중국 쌍색구(双色球) 빨간공 6개 : 1~33 판란색 1개 : 1~16 빨간색, 파란색 두가지 색이라 쌍색구 라 함 APP LINK https://play.google.com/store/apps/details?id=gotopark....