当我尝试将教程应用程序导入Android Studio时,我收到此消息:
distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip
我正在使用android Studio 1.0.1
请告诉我确切的解决方案。
我改变了gradle-wrapper.properties
dependencies {
classpath "com.android.tools.build:gradle:1.0.0"
}`
但它不起作用
我也改变了根文件夹中的build.gradle文件
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, @NonNull Preference preference) {
CheckBoxPreference cb1 = null;
CheckBoxPreference cb2 = null;
ListAdapter adapter = preferenceScreen.getRootAdapter();
for(int i = 0; i < preferenceScreen.getRootAdapter().getCount(); i++)
{
//attention to type and key
Preference pref = (Preference) adapter.getItem(i);
if (pref == null || pref.getKey() == null)
continue;
if (pref.getKey().equals(getString(R.string.tag_preference_key_always_zoom_to_akt_position)))
cb1 = (CheckBoxPreference) pref;
if (pref.getKey().equals(getString(R.string.tag_preference_key_always_zoom_to_last_location)))
cb2 = (CheckBoxPreference) pref;
if (cb1 != null && cb2 != null)
break;
}
//be safe
if (cb1 == null || cb2 == null)
return super.onPreferenceTreeClick(preferenceScreen, preference);
if (preference.getKey().equals(getString(R.string.tag_preference_key_always_zoom_to_akt_position))) {
CheckBoxPreference cb = (CheckBoxPreference) preference;
cb2.setChecked(!cb.isChecked());
}
if (preference.getKey().equals(getString(R.string.tag_preference_key_always_zoom_to_last_location))) {
CheckBoxPreference cb = (CheckBoxPreference) preference;
cb1.setChecked(!cb.isChecked());
}
return super.onPreferenceTreeClick(preferenceScreen, preference);
}
但不起作用......请有人帮助我