Java Android Studio错误“;Android资源编译失败“;
我最近下载了适用于windows 10的Android studio,这是我的第一个项目ide工作正常,但当我测试它时,它给出了如图所示的错误 下面是java代码Java Android Studio错误“;Android资源编译失败“;,java,android,xml,android-studio,Java,Android,Xml,Android Studio,我最近下载了适用于windows 10的Android studio,这是我的第一个项目ide工作正常,但当我测试它时,它给出了如图所示的错误 下面是java代码 package pro.haha_yes_appss.goproooooooooooooooooooooooo; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.webkit.WebViewClie
package pro.haha_yes_appss.goproooooooooooooooooooooooo;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebViewClient;
public class youtube extends AppCompatActivity {
private WebView webView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_youtube);
webView = (WebView) findViewById(R.id.webview);
webView.setWebViewClient(new WebViewClient())
webView.loadurl("https://www.youtube.com/c/TuckerBudzyn/featured")
}
}
如果它与我的xml样式的文件有任何关系,那么它就在这里
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="https://www.youtube.com/c/TuckerBudzyn/featured">
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
<WebView
android:id="@/id+webview"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</RelativeLayout>
ps我正在跟随一个教程这里是它的链接
布局文件中webview的id应采用以下格式:
android:id=“@+id/webview”
不是
android:id=“@/id+webview”
如果这有什么不同,我的应用程序也会使用互联网。您可以显示您的清单吗?webview的id应该是:android:id=“@+id/webview”