I have implemented the newest version of the AdMobSDK in one of my aps and I get the following error every time the application requests a new ad:
06-17 15:52:20.847: ERROR/AdMobSDK(22213): couldn't create a Bitmap
06-17 15:52:20.847: ERROR/AdMobSDK(22213): java.lang.OutOfMemoryError: bitmap size exceeds VM budget
06-17 15:52:20.847: ERROR/AdMobSDK(22213): at android.graphics.BitmapFactory.nativeDecodeByteArray(Native Method)
06-17 15:52:20.847: ERROR/AdMobSDK(22213): at android.graphics.BitmapFactory.decodeByteArray(BitmapFactory.java:495)
06-17 15:52:20.847: ERROR/AdMobSDK(22213): at android.graphics.BitmapFactory.decodeByteArray(BitmapFactory.java:508)
06-17 15:52:20.847: ERROR/AdMobSDK(22213): at com.admob.android.ads.u.a(AssetDownloader.java:211)
06-17 15:52:20.847: ERROR/AdMobSDK(22213): at com.admob.android.ads.i.d(AdMobURLConnector.java:201)
06-17 15:52:20.847: ERROR/AdMobSDK(22213): at com.admob.android.ads.i.run(AdMobURLConnector.java:284)
06-17 15:52:20.847: ERROR/AdMobSDK(22213): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
06-17 15:52:20.847: ERROR/AdMobSDK(22213): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
06-17 15:52:20.847: ERROR/AdMobSDK(22213): at java.lang.Thread.run(Thread.java:1096)
I am using AdMob version 4.1.0. With the old version of AdMob (version 20101109) the application works fine. Can someone suggest a solution? I am testing the application on a Samsung Galaxy S phone. The strange thing is that it used to work before, and I sometimes view ads in the application.
I am not using any large bitmaps in the application, only a few 15 tp 35 K png files - I am also using recycle for some Bitmap decode operations.
Can someone suggest a solution?
Thanks
Related
I am working on a project which integrated
com.facebook.login.widget.LoginButton
.I put it in a fragment and worked fine in past weeks. But suddenly, from yesterday, it's not working. I mean, I could not add this fragment just because the facebook loginbutton is there. I promise that I haven't change either the XML file or the code or logic.
I doubt if it's because the APP_ID expired or something, so I added another app in the facebook developer console, and changed all the configurations. However, it doesn't help.
I've attached the exception stack here:
06-17 11:14:46.056: E/AndroidRuntime(20800): java.lang.NullPointerException: Argument 'context' cannot be null
06-17 11:14:46.056: E/AndroidRuntime(20800): at com.facebook.internal.Validate.notNull(Validate.java:76)
06-17 11:14:46.056: E/AndroidRuntime(20800): at com.facebook.internal.Utility.getMetadataApplicationId(Utility.java:594)
06-17 11:14:46.056: E/AndroidRuntime(20800): at com.facebook.appevents.AppEventsLogger.<init>(AppEventsLogger.java:757)
06-17 11:14:46.056: E/AndroidRuntime(20800): at com.facebook.appevents.AppEventsLogger.<init>(AppEventsLogger.java:732)
06-17 11:14:46.056: E/AndroidRuntime(20800): at com.facebook.appevents.AppEventsLogger.newLogger(AppEventsLogger.java:400)
06-17 11:14:46.056: E/AndroidRuntime(20800): at com.facebook.FacebookButtonBase.logButtonCreated(FacebookButtonBase.java:225)
06-17 11:14:46.056: E/AndroidRuntime(20800): at com.facebook.FacebookButtonBase.onAttachedToWindow(FacebookButtonBase.java:136)
06-17 11:14:46.056: E/AndroidRuntime(20800): at com.facebook.login.widget.LoginButton.onAttachedToWindow(LoginButton.java:452)
06-17 11:14:46.056: E/AndroidRuntime(20800): at android.view.View.dispatchAttachedToWindow(View.java:14514)
06-17 11:14:46.056: E/AndroidRuntime(20800): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2843)
06-17 11:14:46.056: E/AndroidRuntime(20800): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2843)
06-17 11:14:46.056: E/AndroidRuntime(20800): at android.view.ViewGroup.addViewInner(ViewGroup.java:4348)
06-17 11:14:46.056: E/AndroidRuntime(20800): at android.view.ViewGroup.addView(ViewGroup.java:4145)
06-17 11:14:46.056: E/AndroidRuntime(20800): at android.view.ViewGroup.addView(ViewGroup.java:4086)
06-17 11:14:46.056: E/AndroidRuntime(20800): at android.view.ViewGroup.addView(ViewGroup.java:4059)
Expecting some hints. Appreciate ahead.
BTW, I followed the Quick Start to configure, and it WAS working well.
I am using IBM MobileFirst 7.0 for creating a hybrid app. We recently deployed the .wlapp file for android without changing the previous app version. On successful deployment, when I run the app, I get the the following alert message -
"Newer web resources are available. Would you like to download them now?(file size is 86KB)"
On clicking the update button, the unpacking progress bar appears and fills up. But at the end of it I get the message- "Update failed. Direct update failure."
I have tried updating the app on mobile internet and WiFi but the issue still persists.Previously the direct update feature was working fine.
Logcat logs:
06-17 18:44:14.099: D/dalvikvm(17948): GC_FOR_ALLOC freed 485K, 62% free 4275K/11180K, paused 14ms, total 18ms
06-17 18:44:14.109: D/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): WLDirectUpdateDownloader.downloadZipFile in WLDirectUpdateDownloader.java:143 :: 7772 bytes are already available.
06-17 18:44:14.149: D/dalvikvm(17948): GC_FOR_ALLOC freed 553K, 63% free 4218K/11180K, paused 10ms, total 10ms
06-17 18:44:14.149: W/HardwareRenderer(17948): Attempting to initialize hardware acceleration outside of the main thread, aborting
06-17 18:44:14.159: W/PluginManager(17948): THREAD WARNING: exec() call to WLDirectUpdatePlugin.showProgressDialog blocked the main thread for 95ms. Plugin should use CordovaInterface.getThreadPool().
06-17 18:44:14.219: I/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): WLDirectUpdateDownloader.validateZipFileIntegrity in WLDirectUpdateDownloader.java:113 :: Direct update authenticity public key not provided, direct update authenticity check disabled
06-17 18:44:14.229: D/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): WLDirectUpdateDownloader.extractZipFile in WLDirectUpdateDownloader.java:265 :: Start copy files to local storage from updated zip file...
06-17 18:44:14.229: D/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): WLDirectUpdateDownloader.extractZipFile in WLDirectUpdateDownloader.java:266 :: Size of zip file is 7772
06-17 18:44:14.459: D/dalvikvm(17948): GC_FOR_ALLOC freed 443K, 62% free 4280K/11180K, paused 15ms, total 15ms
06-17 18:44:14.459: D/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): WLDirectUpdateDownloader.handleDeltaUpdate in WLDirectUpdateDownloader.java:392 :: Differential Direct Update - delta package detected
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): WLDirectUpdateDownloader.handleDeltaUpdate in WLDirectUpdateDownloader.java:410 :: Can't copy web resources:
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): java.io.FileNotFoundException: www/default/index.html~
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at android.content.res.AssetManager.openAsset(Native Method)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at android.content.res.AssetManager.open(AssetManager.java:316)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at android.content.res.AssetManager.open(AssetManager.java:290)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at com.worklight.androidgap.directupdate.WLDirectUpdateDownloader.copyListFromAssets(WLDirectUpdateDownloader.java:472)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at com.worklight.androidgap.directupdate.WLDirectUpdateDownloader.handleDeltaUpdate(WLDirectUpdateDownloader.java:406)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at com.worklight.androidgap.directupdate.WLDirectUpdateDownloader.extractZipFile(WLDirectUpdateDownloader.java:352)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at com.worklight.androidgap.directupdate.WLDirectUpdateDownloader.startDirectUpdate(WLDirectUpdateDownloader.java:96)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at com.worklight.androidgap.directupdate.WLDirectUpdateDownloader.doInBackground(WLDirectUpdateDownloader.java:83)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at com.worklight.androidgap.directupdate.WLDirectUpdateDownloader.doInBackground(WLDirectUpdateDownloader.java:49)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at android.os.AsyncTask$2.call(AsyncTask.java:288)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at java.lang.Thread.run(Thread.java:841)
06-17 18:44:15.499: W/PluginManager(17948): THREAD WARNING: exec() call to WLDirectUpdatePlugin.hideProgressDialog blocked the main thread for 1007ms. Plugin should use CordovaInterface.getThreadPool().
The recommendation is to update to the latest available patch level (iFix) from IBM Fix Central, and re-build the application (make sure to first up the version in the descriptor.xml and release a new version to the app stores, to account for changes in the native resources of the application).
I am trying to connect to a remote mySQL database which is hosted on my own system means the localhost. I am pasting the code for the whole class here so please see if there is a bug in it. The problem that I am facing is mentioned below the class code.
Code for the class goes here:
public class Login extends Activity implements OnClickListener {
private EditText user, pass;
private Button mSubmit, mRegister;
// Progress Dialog
private ProgressDialog pDialog;
// JSON parser class
JSONParser jsonParser = new JSONParser();
private static final String LOGIN_URL="http://127.0.0.1:8080/webservice/login.php";
private static final String TAG_SUCCESS = "success";
private static final String TAG_MESSAGE = "message";
#Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.login);
// setup input fields
user = (EditText) findViewById(R.id.username);
pass = (EditText) findViewById(R.id.password);
// setup buttons
mSubmit = (Button) findViewById(R.id.login);
mRegister = (Button) findViewById(R.id.register);
// register listeners
mSubmit.setOnClickListener(this);
mRegister.setOnClickListener(this);
}
#Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
case R.id.login:
new AttemptLogin().execute();
break;
case R.id.register:
Intent i = new Intent(this, Register.class);
startActivity(i);
break;
default:
break;
}
}
class AttemptLogin extends AsyncTask<String, String, String> {
#Override
protected void onPreExecute() {
super.onPreExecute();
pDialog = new ProgressDialog(Login.this);
pDialog.setMessage("Attempting login...");
pDialog.setIndeterminate(false);
pDialog.setCancelable(true);
pDialog.show();
}
#Override
protected String doInBackground(String... args) {
// TODO Auto-generated method stub
// Check for success tag
int success;
String username = user.getText().toString();
String password = pass.getText().toString();
try {
// Building Parameters
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("username", username));
params.add(new BasicNameValuePair("password", password));
Log.d("request!", "starting");
// getting product details by making HTTP request
JSONObject json = jsonParser.makeHttpRequest(LOGIN_URL, "POST",
params);
// check your log for json response
Log.d("Login attempt", "login attempt");
// json success tag
success = json.getInt(TAG_SUCCESS);
if (success == 1) {
Log.d("Login Successful!", json.toString());
// save user data
SharedPreferences sp = PreferenceManager
.getDefaultSharedPreferences(Login.this);
Editor edit = sp.edit();
edit.putString("username", username);
edit.commit();
Intent i = new Intent(Login.this, ReadComments.class);
finish();
startActivity(i);
return json.getString(TAG_MESSAGE);
} else {
Log.d("Login Failure!", json.getString(TAG_MESSAGE));
return json.getString(TAG_MESSAGE);
}
} catch (JSONException e) {
e.printStackTrace();
}
return null;
}
protected void onPostExecute(String file_url) {
// dismiss the dialog once product deleted
pDialog.dismiss();
if (file_url != null) {
Toast.makeText(Login.this, file_url, Toast.LENGTH_LONG).show();
}
}
}
}
The application crashes after showing the "Attempting log in" dialog with the message "Database is closed". I am including the information from catlog here so give it a look if it helps.
06-17 03:19:18.309: D/dalvikvm(2019): GC_FOR_ALLOC freed 161K, 8% free 2971K/3224K, paused 35ms, total 49ms
06-17 03:19:18.429: D/request!(2019): starting
06-17 03:19:18.459: I/Choreographer(2019): Skipped 36 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.609: I/Choreographer(2019): Skipped 129 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.669: I/Choreographer(2019): Skipped 43 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.739: I/Choreographer(380): Skipped 61 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.819: I/Choreographer(380): Skipped 37 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.909: I/Choreographer(2019): Skipped 164 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.929: I/Choreographer(380): Skipped 36 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.939: I/Choreographer(2019): Skipped 33 frames! The application may be doing too much work on its main thread.
06-17 03:19:19.039: I/Choreographer(2019): Skipped 30 frames! The application may be doing too much work on its main thread.
06-17 03:19:19.299: I/Choreographer(2019): Skipped 32 frames! The application may be doing too much work on its main thread.
06-17 03:19:19.399: I/Choreographer(2019): Skipped 56 frames! The application may be doing too much work on its main thread.
06-17 03:19:20.819: I/Choreographer(2019): Skipped 42 frames! The application may be doing too much work on its main thread.
06-17 03:19:20.889: I/Choreographer(2019): Skipped 32 frames! The application may be doing too much work on its main thread.
06-17 03:19:21.749: I/Choreographer(2019): Skipped 37 frames! The application may be doing too much work on its main thread.
06-17 03:19:21.879: I/Choreographer(2019): Skipped 48 frames! The application may be doing too much work on its main thread.
06-17 03:19:22.449: I/Choreographer(2019): Skipped 52 frames! The application may be doing too much work on its main thread.
06-17 03:19:22.749: W/System.err(2019): org.apache.http.conn.HttpHostConnectException: Connection to http://127.0.0.1:8080 refused
06-17 03:19:22.779: I/Choreographer(2019): Skipped 55 frames! The application may be doing too much work on its main thread.
06-17 03:19:22.989: W/System.err(2019): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:183)
06-17 03:19:22.989: W/System.err(2019): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
06-17 03:19:22.989: W/System.err(2019): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
06-17 03:19:23.029: I/Choreographer(2019): Skipped 43 frames! The application may be doing too much work on its main thread.
06-17 03:19:23.279: W/System.err(2019): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
06-17 03:19:23.279: W/System.err(2019): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
06-17 03:19:23.279: W/System.err(2019): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
06-17 03:19:23.279: W/System.err(2019): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
06-17 03:19:23.289: W/System.err(2019): at com.example.mysqltest.JSONParser.makeHttpRequest(JSONParser.java:110)
06-17 03:19:23.289: W/System.err(2019): at com.example.mysqltest.Login$AttemptLogin.doInBackground(Login.java:121)
06-17 03:19:23.289: W/System.err(2019): at com.example.mysqltest.Login$AttemptLogin.doInBackground(Login.java:1)
06-17 03:19:23.289: W/System.err(2019): at android.os.AsyncTask$2.call(AsyncTask.java:288)
06-17 03:19:23.289: W/System.err(2019): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-17 03:19:23.289: W/System.err(2019): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
06-17 03:19:23.289: W/System.err(2019): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
06-17 03:19:23.289: W/System.err(2019): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
06-17 03:19:23.289: W/System.err(2019): at java.lang.Thread.run(Thread.java:841)
06-17 03:19:23.319: I/Choreographer(2019): Skipped 42 frames! The application may be doing too much work on its main thread.
06-17 03:19:23.739: W/System.err(2019): Caused by: java.net.ConnectException: failed to connect to /127.0.0.1 (port 8080): connect failed: ECONNREFUSED (Connection refused)
06-17 03:19:23.739: W/System.err(2019): at libcore.io.IoBridge.connect(IoBridge.java:114)
06-17 03:19:23.739: W/System.err(2019): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
06-17 03:19:23.759: W/System.err(2019): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)
06-17 03:19:23.769: W/System.err(2019): at java.net.Socket.connect(Socket.java:843)
06-17 03:19:23.769: W/System.err(2019): at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119)
06-17 03:19:23.769: W/System.err(2019): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:144)
06-17 03:19:23.769: W/System.err(2019): ... 15 more
06-17 03:19:23.769: W/System.err(2019): Caused by: libcore.io.ErrnoException: connect failed: ECONNREFUSED (Connection refused)
06-17 03:19:23.829: I/Choreographer(2019): Skipped 84 frames! The application may be doing too much work on its main thread.
06-17 03:19:23.839: W/System.err(2019): at libcore.io.Posix.connect(Native Method)
06-17 03:19:23.839: W/System.err(2019): at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:85)
06-17 03:19:23.849: W/System.err(2019): at libcore.io.IoBridge.connectErrno(IoBridge.java:127)
06-17 03:19:23.849: W/System.err(2019): at libcore.io.IoBridge.connect(IoBridge.java:112)
06-17 03:19:23.849: W/System.err(2019): ... 20 more
06-17 03:19:23.849: E/Buffer Error(2019): Error converting result java.lang.NullPointerException: lock == null
06-17 03:19:23.879: I/Choreographer(2019): Skipped 49 frames! The application may be doing too much work on its main thread.
06-17 03:19:24.439: I/Choreographer(2019): Skipped 31 frames! The application may be doing too much work on its main thread.
06-17 03:19:24.499: I/Choreographer(2019): Skipped 34 frames! The application may be doing too much work on its main thread.
06-17 03:19:24.569: E/JSON Parser(2019): Error parsing data org.json.JSONException: End of input at character 0 of
06-17 03:19:24.569: D/Login attempt(2019): login attempt
06-17 03:19:25.019: W/dalvikvm(2019): threadid=11: thread exiting with uncaught exception (group=0xb4a8aba8)
06-17 03:19:25.199: E/AndroidRuntime(2019): FATAL EXCEPTION: AsyncTask #1
06-17 03:19:25.199: E/AndroidRuntime(2019): Process: com.example.mysqltest, PID: 2019
06-17 03:19:25.199: E/AndroidRuntime(2019): java.lang.RuntimeException: An error occured while executing doInBackground()
06-17 03:19:25.199: E/AndroidRuntime(2019): at android.os.AsyncTask$3.done(AsyncTask.java:300)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.util.concurrent.FutureTask.run(FutureTask.java:242)
06-17 03:19:25.199: E/AndroidRuntime(2019): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.lang.Thread.run(Thread.java:841)
06-17 03:19:25.199: E/AndroidRuntime(2019): Caused by: java.lang.NullPointerException
06-17 03:19:25.199: E/AndroidRuntime(2019): at com.example.mysqltest.Login$AttemptLogin.doInBackground(Login.java:128)
06-17 03:19:25.199: E/AndroidRuntime(2019): at com.example.mysqltest.Login$AttemptLogin.doInBackground(Login.java:1)
06-17 03:19:25.199: E/AndroidRuntime(2019): at android.os.AsyncTask$2.call(AsyncTask.java:288)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-17 03:19:25.199: E/AndroidRuntime(2019): ... 4 more
06-17 03:19:25.229: I/Choreographer(2019): Skipped 35 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.279: W/ActivityManager(380): Force finishing activity com.example.mysqltest/.Login
06-17 03:19:25.309: D/gralloc(51): Registering a buffer in the process that created it. This may cause memory ordering problems.
06-17 03:19:25.309: E/libEGL(51): called unimplemented OpenGL ES API
06-17 03:19:25.309: E/libEGL(51): called unimplemented OpenGL ES API
06-17 03:19:25.319: E/libEGL(51): called unimplemented OpenGL ES API
06-17 03:19:25.319: E/libEGL(51): called unimplemented OpenGL ES API
06-17 03:19:25.319: E/SurfaceFlinger(51): glCheckFramebufferStatusOES error 886920962
06-17 03:19:25.319: E/SurfaceFlinger(51): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
06-17 03:19:25.319: E/libEGL(51): called unimplemented OpenGL ES API
06-17 03:19:25.319: E/libEGL(51): called unimplemented OpenGL ES API
06-17 03:19:25.329: I/Choreographer(2019): Skipped 91 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.359: W/WindowManager(380): Screenshot failure taking screenshot for (123x221) to layer 21015
06-17 03:19:25.589: I/Choreographer(380): Skipped 92 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.599: I/Choreographer(2019): Skipped 203 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.669: I/Choreographer(2019): Skipped 65 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.719: I/Choreographer(380): Skipped 115 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.779: I/Choreographer(2019): Skipped 92 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.839: I/Choreographer(542): Skipped 288 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.869: I/Choreographer(380): Skipped 35 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.939: I/Choreographer(380): Skipped 45 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.939: I/Choreographer(2019): Skipped 41 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.069: I/Choreographer(380): Skipped 124 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.119: I/Choreographer(380): Skipped 41 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.129: I/Choreographer(2019): Skipped 35 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.169: I/Choreographer(2019): Skipped 30 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.259: I/Choreographer(380): Skipped 35 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.269: I/Choreographer(2019): Skipped 89 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.309: I/Choreographer(380): Skipped 35 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.319: I/Choreographer(2019): Skipped 46 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.369: I/Choreographer(380): Skipped 46 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.379: I/Choreographer(2019): Skipped 54 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.469: I/Choreographer(2019): Skipped 80 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.499: I/Choreographer(380): Skipped 115 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.589: I/Choreographer(2019): Skipped 116 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.619: I/Choreographer(380): Skipped 80 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.689: I/Choreographer(380): Skipped 37 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.849: I/Choreographer(380): Skipped 77 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.939: I/Choreographer(380): Skipped 43 frames! The application may be doing too much work on its main thread.
06-17 03:19:27.009: I/Choreographer(380): Skipped 41 frames! The application may be doing too much work on its main thread.
06-17 03:19:27.169: I/Choreographer(380): Skipped 36 frames! The application may be doing too much work on its main thread.
06-17 03:19:27.349: E/WindowManager(2019): android.view.WindowLeaked: Activity com.example.mysqltest.Login has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{b4d95578 V.E..... R.....ID 0,0-228,72} that was originally added here
06-17 03:19:27.349: E/WindowManager(2019): at android.view.ViewRootImpl.<init>(ViewRootImpl.java:348)
06-17 03:19:27.349: E/WindowManager(2019): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:248)
06-17 03:19:27.349: E/WindowManager(2019): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
06-17 03:19:27.349: E/WindowManager(2019): at android.app.Dialog.show(Dialog.java:286)
06-17 03:19:27.349: E/WindowManager(2019): at com.example.mysqltest.Login$AttemptLogin.onPreExecute(Login.java:103)
06-17 03:19:27.349: E/WindowManager(2019): at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:587)
06-17 03:19:27.349: E/WindowManager(2019): at android.os.AsyncTask.execute(AsyncTask.java:535)
06-17 03:19:27.349: E/WindowManager(2019): at com.example.mysqltest.Login.onClick(Login.java:82)
06-17 03:19:27.349: E/WindowManager(2019): at android.view.View.performClick(View.java:4438)
06-17 03:19:27.349: E/WindowManager(2019): at android.view.View$PerformClick.run(View.java:18422)
06-17 03:19:27.349: E/WindowManager(2019): at android.os.Handler.handleCallback(Handler.java:733)
06-17 03:19:27.349: E/WindowManager(2019): at android.os.Handler.dispatchMessage(Handler.java:95)
06-17 03:19:27.349: E/WindowManager(2019): at android.os.Looper.loop(Looper.java:136)
06-17 03:19:27.349: E/WindowManager(2019): at android.app.ActivityThread.main(ActivityThread.java:5017)
06-17 03:19:27.349: E/WindowManager(2019): at java.lang.reflect.Method.invokeNative(Native Method)
06-17 03:19:27.349: E/WindowManager(2019): at java.lang.reflect.Method.invoke(Method.java:515)
06-17 03:19:27.349: E/WindowManager(2019): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
06-17 03:19:27.349: E/WindowManager(2019): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
06-17 03:19:27.349: E/WindowManager(2019): at dalvik.system.NativeStart.main(Native Method)
06-17 03:19:27.359: I/Choreographer(2019): Skipped 273 frames! The application may be doing too much work on its main thread.
06-17 03:19:27.449: I/Choreographer(2019): Skipped 85 frames! The application may be doing too much work on its main thread.
06-17 03:20:10.919: D/LightsService(380): Excessive delay setting light: 89ms
Please note that the about catlog information is after I press the login button.
Please, check mysql-service is running or not.
If no then service is stop, then check space available at harddisk.
If space is not availbale then try to increase free space or increase
hard disk space, then restart mysql service.
I have written GAE cloud endpoint APIs and have successfully deployed them to App Engine. The APIs run successfully locally as well as after deployment on App Engine.
After generating cloud endpoints, i tried to call one of the APIs in my Android client and it throws "GoogleJSONResponseException 404 not found" exception. In the API method, I am using HttpURLConnection and JAXB unmarshaller to call a URL and unmarshall the XML response. The code is as follows:
String uri=<some url>;
URL url = new URL(uri);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Accept", "application/xml");
JAXBContext jc = JAXBContext.newInstance(MyResponse.class);
InputStream xml = connection.getInputStream();
response = (MyResponse) jc.createUnmarshaller().unmarshal(xml);
connection.disconnect();
Why does this not work only when trying to call from the android client using the endpoint client library? Am i doing something wrong?
Note: I called another API in the same android client which just inserts data into the datastore and it works fine
The LogCat console looks as follows:
06-17 11:44:49.081: W/System.err(2035): com.google.api.client.googleapis.json.GoogleJsonResponseException: 404 Not Found
06-17 11:44:49.081: W/System.err(2035): Not Found
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:111)
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:38)
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:314)
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1060)
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:412)
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:345)
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:463)
06-17 11:44:49.081: W/System.err(2035): at com.niru.i_collect.RegistrationActivity$FindAddressTask.doInBackground(RegistrationActivity.java:296)
06-17 11:44:49.081: W/System.err(2035): at com.niru.i_collect.RegistrationActivity$FindAddressTask.doInBackground(RegistrationActivity.java:1)
06-17 11:44:49.081: W/System.err(2035): at android.os.AsyncTask$2.call(AsyncTask.java:287)
06-17 11:44:49.081: W/System.err(2035): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
06-17 11:44:49.081: W/System.err(2035): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
06-17 11:44:49.081: W/System.err(2035): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
06-17 11:44:49.081: W/System.err(2035): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
06-17 11:44:49.081: W/System.err(2035): at java.lang.Thread.run(Thread.java:856)
There is a weird bug in App Engine. It seems that when this happens, you have to go to the App Engine Console -> Main -> Versions.
There you will see a list of versions with a Make Default button below. Select the radio button for the latest version and press the make default button, wait a minute or so, and try your call again.
Note that even if you have only one version that is already set as the default this solution should still work.
You may have to do this again the next time you deploy to app engine.
So, i've made the raindrop tutorial project by libGDX. However, when i attempt to deploy it to the emulator i get an error saying that the image is not a power of 2. But i did re-size the images to be 48X48 using GIMP (as the tutorial had suggested). I believe he had added in some code to ensure that it would be possible to add in images that were not necessarily a power of two?
Does anyone know how i would fix this? Making it a power of two is a bit limiting.. isn't it? I followed the tutorial very closely! So... i'm not sure where to go from here. Noob at libGDX.
LogCat Dump:
06-11 00:22:50.942: W/dalvikvm(545): threadid=11: thread exiting with uncaught exception (group=0x409c01f8)
06-11 00:22:50.952: E/AndroidRuntime(545): FATAL EXCEPTION: GLThread 72
06-11 00:22:50.952: E/AndroidRuntime(545): com.badlogic.gdx.utils.GdxRuntimeException: Texture width and height must be powers of two: 48x48
06-11 00:22:50.952: E/AndroidRuntime(545): at com.badlogic.gdx.graphics.Texture.uploadImageData(Texture.java:197)
06-11 00:22:50.952: E/AndroidRuntime(545): at com.badlogic.gdx.graphics.Texture.load(Texture.java:179)
06-11 00:22:50.952: E/AndroidRuntime(545): at com.badlogic.gdx.graphics.Texture.create(Texture.java:159)
06-11 00:22:50.952: E/AndroidRuntime(545): at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:133)
06-11 00:22:50.952: E/AndroidRuntime(545): at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:122)
06-11 00:22:50.952: E/AndroidRuntime(545): at com.badlogic.drop.Drop.create(Drop.java:38)
06-11 00:22:50.952: E/AndroidRuntime(545): at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:292)
06-11 00:22:50.952: E/AndroidRuntime(545): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1455)
06-11 00:22:50.952: E/AndroidRuntime(545): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216)
06-11 00:22:51.041: I/AndroidInput(545): sensor listener tear down
06-11 00:22:51.041: I/AndroidGraphics(545): Managed meshes/app: { }
06-11 00:22:51.041: I/AndroidGraphics(545): Managed textures/app: { }
06-11 00:22:51.041: I/AndroidGraphics(545): Managed shaders/app: { }
06-11 00:22:51.041: I/AndroidGraphics(545): Managed buffers/app: { }
48x48 is not a power of two. The app requires OpenGL ES 2.0 as stated in the text. The standard emulator only runs OpenGL ES 1.0. You can rescale the image to 32x32, then everything will work as expected on OpenGL ES 1.x as well.
I'd recommend not using the emulator for testing OpenGL ES apps. Use a real device instead.
You can stop it from enforcing the power of two requirement by setting the following line of code in your game class in the create() method:
Texture.setEnforcePotImages(false);
this worked for me
change all "GL10" imported from "com.badlogic.gdx.graphics.GL10" to "GL20" imported from "com.badlogic.gdx.graphics.GL20"