W / InputMethodManagerService:得到RemoteException向pid发送setActive(false)通知2262 uid 10062

时间:2016-01-25 08:22:35

标签: android parse-platform login

A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
01-25 13:16:29.045 1668-1677/? E/StrictMode: java.lang.Throwable: Explicit termination method 'end' not called
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at dalvik.system.CloseGuard.open(CloseGuard.java:184)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at java.util.zip.Inflater.<init>(Inflater.java:82)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.android.okio.GzipSource.<init>(GzipSource.java:57)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.android.okhttp.internal.http.HttpEngine.initContentStream(HttpEngine.java:478)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:668)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:379)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:491)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:25)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.google.android.gms.http.GoogleHttpClient.a(SourceFile:795)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.google.android.gms.http.GoogleHttpClient.a(SourceFile:760)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.google.android.gms.http.GoogleHttpClient.execute(SourceFile:667)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.google.android.gms.http.GoogleHttpClient.execute(SourceFile:651)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.google.android.gms.auth.be.j.a(SourceFile:209)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.google.android.gms.auth.be.appcert.a.a(SourceFile:263)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.google.android.gms.auth.be.appcert.a.a(SourceFile:132)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.google.android.gms.auth.be.appcert.b.a(SourceFile:43)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.google.android.gms.auth.b.b.a(SourceFile:62)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.google.android.gms.auth.b.a.a(SourceFile:120)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.google.android.gms.auth.b.a.a(SourceFile:61)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.google.android.gms.auth.be.cron.AuthCronService.a(SourceFile:44)
01-25 13:16:29.045 1668-1677/? E/StrictMode:     at com.google.android.gms.gcm.at.run(SourceFile:142)
01-25 13:16:29.051 1668-1677/? E/StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
01-25 13:16:29.051 1668-1677/? E/StrictMode: java.lang.Throwable: Explicit termination method 'close' not called
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at dalvik.system.CloseGuard.open(CloseGuard.java:184)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.google.android.gms.org.conscrypt.Platform.closeGuardOpen(SourceFile:324)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.google.android.gms.org.conscrypt.OpenSSLSocketImpl.startHandshake(SourceFile:292)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.google.android.gms.org.conscrypt.KitKatPlatformOpenSSLSocketImplAdapter.startHandshake(SourceFile:318)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.google.android.gms.common.net.SSLCertificateSocketFactory.a(SourceFile:258)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.google.android.gms.common.net.SSLCertificateSocketFactory.createSocket(SourceFile:557)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.android.okhttp.Connection.upgradeToTls(Connection.java:171)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.android.okhttp.Connection.connect(Connection.java:151)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:276)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:106)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:208)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:25)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.google.android.gms.http.GoogleHttpClient.a(SourceFile:917)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.google.android.gms.http.GoogleHttpClient.a(SourceFile:759)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.google.android.gms.http.GoogleHttpClient.execute(SourceFile:667)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.google.android.gms.http.GoogleHttpClient.execute(SourceFile:651)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.google.android.gms.auth.be.j.a(SourceFile:209)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.google.android.gms.auth.be.appcert.a.a(SourceFile:263)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.google.android.gms.auth.be.appcert.a.a(SourceFile:132)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.google.android.gms.auth.be.appcert.b.a(SourceFile:43)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.google.android.gms.auth.b.b.a(SourceFile:62)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.google.android.gms.auth.b.a.a(SourceFile:120)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.google.android.gms.auth.b.a.a(SourceFile:61)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.google.android.gms.auth.be.cron.AuthCronService.a(SourceFile:44)
01-25 13:16:29.051 1668-1677/? E/StrictMode:     at com.google.android.gms.gcm.at.run(SourceFile:142)

我希望我的应用程序允许我在后端使用解析登录。以下是我登录活动类的代码。 我是android新手请帮助

 public class LoginActivity extends ActionBarActivity {
    Button loginButton;

    String txtUsername;
    String txtPassword;
    EditText password;
    EditText username;

    @Override
    protected void onCreate(Bundle saveInstanceState) {
        super.onCreate(saveInstanceState);
        setContentView(R.layout.activity_login);

        loginButton = (Button) findViewById(R.id.login);

        loginButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                txtUsername = username.getText().toString();
                txtPassword = password.getText().toString();

                ParseUser.logInInBackground(txtUsername, txtPassword, new LogInCallback() {
                    @Override
                    public void done(ParseUser user, ParseException e) {
                        if (user != null) {
                            Intent intent = new Intent(LoginActivity.this, Welcome.class);
                            startActivity(intent);
                            finish();
                        } else {
                            Toast.makeText(getApplicationContext(), "This user does not exist! Please Sign up", Toast.LENGTH_SHORT).show();
                        }
                    }
                });
            }
        });
    }
}
Following is my parseconnector class code

    public class ParseConnector extends MultiDexApplication {

        @Override
        public void onCreate(){
        super.onCreate();

        Parse.initialize(this, "ZzfoJHON4Gc******2YlIhOFT3Tk8GOoANeO", "9ikHKNBO6BfmNRMauxckoB******ZzxlBPYDL");
        ParseInstallation.getCurrentInstallation().saveInBackground();
            ParseUser.enableAutomaticUser();
            ParseACL defaultACL = new ParseACL();
            defaultACL.setPublicReadAccess(true);
            ParseACL.setDefaultACL(defaultACL, true);
    }
}

0 个答案:

没有答案