layoutinflater

Android google maps v2 crashing on startup

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In my android app supporting 2.2 and higher, I am trying to use the google maps api v2. I have this so far: Does anyone know what the issue is? Thanks. xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen

Error inflating class com.google.ads.AdView (InflateException)

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am trying to show a adview in my android application, but it shows an InflateException. This terminates the app and I cannot do anything. Here is my logcat - 05 - 06 14 : 09 : 09.428 : E / AndroidRuntime ( 928 ): FATAL EXCEPTION : main 05 - 06 14 : 09 : 09.428 : E / AndroidRuntime ( 928 ): java . lang . RuntimeException : Unable to start activity ComponentInfo { com . kodspider . parkon / com . kodspider . parkon . HomeActivity }: android . view . InflateException : Binary XML file line #18: Error inflating class com.google.ads

Android Google Maps V2 Caused by: java.lang.ClassCastException: com.google.android.gms.maps.SupportMapFragment cannot be cast to android.app.Fragment

匿名 (未验证) 提交于 2019-12-03 09:52:54
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have this in my class import android.os.Bundle; import android.support.v4.app.FragmentActivity; import com.coffeeandcookies.ushuaiamovil.R; public class LayMapa2 extends FragmentActivity { @Override protected void onCreate(Bundle arg0) { setContentView(R.layout.lay_mapa2); super.onCreate(arg0); } } This in my xml <?xml version="1.0" encoding="utf-8"?> <fragment xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" android:name="com.google

java.lang.IllegalStateException: RecyclerView has no LayoutManager

匿名 (未验证) 提交于 2019-12-03 09:06:55
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am getting below exception- Caused by: java.lang.IllegalStateException: RecyclerView has no LayoutManager at android.support.v7.widget.RecyclerView.generateLayoutParams(RecyclerView.java:2820) at android.view.LayoutInflater.rInflate(LayoutInflater.java:757) at android.view.LayoutInflater.inflate(LayoutInflater.java:492) at android.view.LayoutInflater.inflate(LayoutInflater.java:397) at com.peoplecloud.app.guggu.NavigationDrawerFragment.onCreateView(NavigationDrawerFragment.java:75) at android.app.Fragment.performCreateView(Fragment.java

UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView

匿名 (未验证) 提交于 2019-12-03 09:06:55
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to create a simple Android app and I'm getting this error: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.twista.shopinglist/com.twista.shopinglist.ItemDetail}: java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView I tried to google it and fix via some answers here, but unsuccessfuly it didn't resolve :(. I have a MainActivity with ListView , in onCreate() I call public class MainActivity extends Activity { .... @Override protected void onCreate(Bundle

Android Studio - Error inflating class com.google.ads.AdView

匿名 (未验证) 提交于 2019-12-03 08:30:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using new Android Studio. I've done an application and works fine, now I've to add AdMob sdk. so I put the jar in 'libs' folder and right-click "add as library". I run the project on my smartphone but the application crashes on startup. How can i solve this? I think it'll be something wrong with the import of AdMob sdk. Thank you! This is the xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.my.application" android:installLocation="preferExternal" android

exception raised during rendering:Binary XML file line #-1:error inflating class&lt;unknown&gt;

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I tried to include check boxes in the layout and after dragging and dropping I get this error: exception raised during rendering:Binary XML file line #-1:error inflating class . xml file: please provide step by step solution. details link says : java.lang.NoSuchMethodError: android.graphics.drawable.VectorDrawable_Delegate.nCreateTreeFromCopy(JJ)J at android.graphics.drawable.VectorDrawable.nCreateTreeFromCopy(VectorDrawable.java) at android.graphics.drawable.VectorDrawable.access$400(VectorDrawable.java:204) at android.graphics.drawable

“You need to use a Theme.AppCompat theme (or descendant) with the design library” error

匿名 (未验证) 提交于 2019-12-03 03:10:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm getting "You need to use a Theme.AppCompat theme (or descendant) with the design library" error every time even if I'm obviously using an AppCompat Theme (a descendant one). dependencies: compile 'com.android.support:appcompat-v7:23.3.0' compile 'com.android.support:design:23.3.0' compile 'com.android.support:support-v4:23.3.0' layout: theme: */ /*--> */ manifest: (...) I'm inflating the layout inside a service : tooltipContainer = ( CoordinatorLayout ) LayoutInflater . from ( this ). inflate ( R . layout . tooltip_layout ,

Unable instantiate android.gms.maps.MapFragment

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I try to do a demo with google maps android v2 with very simple activity, just copy code from google page: https://developers.google.com/maps/documentation/android/start#adding_the_api_key_to_your_application for activity: package com.example.mapdemo; import android.app.Activity; import android.os.Bundle; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } for layout: I had apply for a api key according to page and

Android Scrollable Tabs + Swipe state when swiping

匿名 (未验证) 提交于 2019-12-03 02:52:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to make an application with multiple Tabs. For each tab I'm using different fragments. And when I leaf through tabs the information in them is changing. How can I save the state of each tab when swiping? Code for example: MainActivity.java : package com.tabs.example; import java.util.Locale; import android.graphics.Color; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter;