The container JRE System Library JavaSE references non existing library
Eclipse Error: The container JRE System Library JavaSE references non existing library QTJava.zip
Workaround:
Windows->Preferences->Java->Installed JRE
Press Add and select your JRE folder path for example:
c:\Program Files\Java\jre7\
and check your choice.
Workaround:
Windows->Preferences->Java->Installed JRE
Press Add and select your JRE folder path for example:
c:\Program Files\Java\jre7\
and check your choice.
396LW NO topic_id
AD
Další témata ....(Topics)
getContext() getApplicationContext() method Java Android example source
Context myContext_1 = ThisClassName.this; // to open a Dialog
Context myContext_2 = getContext();
Context myContext_3 = this.getContext();
Context myContext_4 = this;
Context myContext_5 = this.getApplicationContext ();
OnClickListener getImageBtnOnClick = new OnClickListener() {
public void onClick(View view) {
Context context = view.getContext();
}
};
// Toast
Toast.makeText(getApplicationContext(), "Context == getApplicationContext "
, Toast.LENGTH_SHORT).show();
// store Context in public class
public class MyActivity extends Activity {
public static Context myCnt = null;
...
protected void onCreate(Bundle icicle) {
...
myCnt = this;
MyStorage.setContext(myCnt);
// or
// MyStorage.setContext(this);
// cntxFromStorage == this
Context cntxFromStorage = MyStorage.getContext();
...
};
};
public class MyStorage
{
private static Context cntStorageContext = null;
public static Context getContext() {
return cntStorageContext;
}
public static void setContext(Context context) {
MyStorage.cntStorageContext = context;
}
};
class DataBaseHelper extends SQLiteOpenHelper {
// get MyActivity context
Context cnt = MyStorage.getContext();
}
If you do click on Rebuid project menu item, this operation maybe consume long time on slovly PC.
Some errors dismis when you do rebuild project, or module.
Try this:
Select module where contains red error code and press Debugg or Run button on Android Studio.
If module code contains errors, Android Studio show error report in gradle console.
If not, apk will installed on device.
This is 10 times faster than Clean - Rebuild all project.
Some errors dismis when you do rebuild project, or module.
Try this:
Select module where contains red error code and press Debugg or Run button on Android Studio.
If module code contains errors, Android Studio show error report in gradle console.
If not, apk will installed on device.
This is 10 times faster than Clean - Rebuild all project.
If you create a button or view programmatically with OnClickListener you can set a tag key before button in parent layout is added.
And get correct button by this tag getTag() instead getId() in OnClickListener etc.
And get correct button by this tag getTag() instead getId() in OnClickListener etc.
Button button = new Button(getApplicationContext());
int idOfButton = button.getId(); // return -1
button.setTag("my_button");
String sTag = (String) button.getTag(); // return "my_button"
The Labeled continue statement as goto Java example.
public class MainClass {
public static void main(String[] arg) {
String[] arrayOfString = { "Hello", "people", "hello", "world!" };
OuterLoop: for (int e = 0; e < 4; e++) {
for (int i = 0; i < arrayOfString.length; i++) {
if (arrayOfString[i].equals("hello"))
continue OuterLoop;
System.out.println(arrayOfString[i]);
}
}
}
}
/*
Hello
people
Hello
people
Hello
people
Hello
people
*/
Check
- is sett debug mode on device?
- enabled debugging over USB?
- is device right connected?
- have you downloaded and instaled drivers for your device on PC?
- For Windows //developer.android.com/sdk/win-usb.html
- try disconnect and connect USB cable
- try do restart Android Studio
Editace: 2014-02-15 20:28:56
Počet článků v kategorii: 396
Url:the-container-jre-system-library-javase-references-non-existing-library