我正在设置一个使用Google OAUTH登录的项目。我必须创建一个签名的APK然后将sha1添加到谷歌网站上的应用程序设置。
一节要求我添加我的包名。我添加了它,
完成配置后,我知道有这个错误,
channel
'4abe725 com.mysite.mysite/com.mysite.mysite.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
E/NetworkScheduler.SchedulerReceiver: Invalid parameter app
E/NetworkScheduler.SchedulerReceiver: Invalid package name :
Perhaps you didn't include a PendingIntent in the extras?
请注意此包名称正在重复,
com.mysite.mysite/com.mysite.mysite.MainActivity
我想知道我创建签名的apk后我的应用程序配置是否已损坏。如果出现问题,如何更改文件路径?
webview.java
public class WebViewActivity extends Activity {
private WebView webView;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.webview);
webView = (WebView) findViewById(R.id.webView1);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("http://www.google.com");
}
}
webview.xml
<?xml version="1.0" encoding="utf-8"?>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
主要活动
公共类MainActivity扩展了Activity {
private Button button;
private GoogleApiClient client;
public void onCreate(Bundle savedInstanceState) {
final Context context = this;
super.onCreate(savedInstanceState);
setContentView(R.layout.content_main);
button = (Button) findViewById(R.id.buttonUrl);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
Intent intent = new Intent(context, WebViewActivity.class);
startActivity(intent);
}
});