This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
正确使用adb读取data下目录 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HttpClient was deprecated in API Level 22 and removed in API Level 23. | |
You can still use it in API Level 23 and onwards if you must, | |
however it is best to move to supported methods to handle HTTP. | |
So, if you're compiling with 23, add this in your build.gradle: | |
android { | |
useLibrary 'org.apache.http.legacy' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
打开项目的gradle.properties,往里添加 | |
# http | |
systemProp.http.proxyHost=www.somehost.org | |
systemProp.http.proxyPort=port | |
systemProp.http.proxyUser=userid | |
systemProp.http.proxyPassword=password | |
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost | |
# https | |
systemProp.https.proxyHost=www.somehost.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NotificationCompat.Builder builder = new NotificationCompat.Builder(this); | |
Bitmap icon = BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher); | |
builder.setContentText("test!!"); | |
builder.setContentTitle("test_title"); | |
builder.setLargeIcon(icon); | |
builder.setSmallIcon(R.drawable.ic_launcher); | |
builder.setPriority(Notification.PRIORITY_MIN); // 重点是这句 | |
NotificationManager nf = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE); | |
nf.notify(0,builder.build()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<br/> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files | |