Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
Uri uri = Uri.fromParts("package", getPackageName(), null);
intent.setData(uri);
context.startActivity(intent);
}
注意,在引入 ?Gen的庫的時候,可能會出現同步失敗的問題,出現如下類似問題:
Error:(7, 9) Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:7:9 Error:(7, 9) Execution failed for task ':importdemo:processDebugManifest'. > Manifest merger failed : Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:7:9 is also present at com.pnikosis:materialish-progress:1.0:13:9 value=(@drawable/ic_launcher) Suggestion: add 'tools:replace="android:icon"' to <application> element a
?
這是由于 庫中引用的 value 和 你項目中 mainfast 中的 value 發生沖突,解決辦法如下: