From e932238fc2a8aeb11ef28d367d4bba39943abda4 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 13 Jan 2023 09:46:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DGoogleFragment.java=E7=9A=84u?= =?UTF-8?q?rl=E4=B8=BA=E7=A9=BA=E5=AF=BC=E8=87=B4=E5=9C=A8=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E6=97=A5=E5=BF=97=E6=97=B6=E5=AF=BC=E8=87=B4=E7=9A=84?= =?UTF-8?q?=E7=A9=BA=E6=8C=87=E9=92=88=E9=97=AA=E9=80=80=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/yunbao/main/activity/GoogleFragment.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main/src/main/java/com/yunbao/main/activity/GoogleFragment.java b/main/src/main/java/com/yunbao/main/activity/GoogleFragment.java index 7ca8599cc..62d937191 100644 --- a/main/src/main/java/com/yunbao/main/activity/GoogleFragment.java +++ b/main/src/main/java/com/yunbao/main/activity/GoogleFragment.java @@ -24,6 +24,7 @@ import com.yunbao.common.CommonAppConfig; import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.utils.GoogleBillingUtilNew; +import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.main.R; import com.yunbao.main.views.TestWebViewClient; @@ -55,6 +56,10 @@ public class GoogleFragment extends Fragment { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { //通过参数中的布局填充获取对应布局 view = inflater.inflate(R.layout.activity_recharge, container, false); + if(StringUtil.isEmpty(url)){ + Log.e(TAG, "URL为空" ); + return view; + } rlWebview = (WebView) view.findViewById(R.id.rlWebview); Log.e("ttt", url); rlWebview.loadUrl(url);