ich eine adview (admob) im Boden eines webview setzen wirdAndroid Studio: Fehler: Keine Ressource festgestellt, dass die angegebenen Namen übereinstimmt (bei ‚layout_above‘ mit dem Wert ‚@ id/adView‘)
Wenn ich Gradle Sync, bekomme ich diesen Fehler. Könnten Sie mir bitte helfen, dieses Problem zu lösen?
C:\Users\danie\AndroidStudioProjects\PokemonDamageCalculator\app\src\main\res\layout\activity_main.xml Error:(20, 31) No resource found that matches the given name (at 'layout_above' with value '@id/adView'). C:\Users\danie\AndroidStudioProjects\PokemonDamageCalculator\app\build\intermediates\res\merged\debug\layout\activity_main.xml Error:(20, 31) No resource found that matches the given name (at 'layout_above' with value '@id/adView'). Error:Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: Failed to execute aapt
Das ist mein MainActivity.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical"
tools:context="danilkp1234.com.pokemondamagecalculator.MainActivity">
<include
layout="@layout/content_main"
android:layout_width="match_parent"
android:layout_height="50dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/adView"
android:layout_weight="1"
android:orientation="vertical">
<WebView
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent">
</WebView>
</LinearLayout>
Ihre MainActivity.xml scheint nicht vollständig zu sein. Das erste LinearLayout wird nicht geschlossen –
'android: Layout_oben 'ist ein ** RelativeLayout ** Attribut. Es wird nicht in einem LinearLayout-Container funktionieren. –