resource.cfg math & res...

新建的android项目,多了一个appcompat_v7 invalid resource directory name_百度知道
新建的android项目,多了一个appcompat_v7 invalid resource directory name
appcompat_v7里res文件下drawable-ldrtl-xxxhdpi和drawable-xxxhdpi无效./zhidao/pic/item/b812c8fcc3cec3fde8e726f5d588d43f,invalid resource directory name&nbsp.hiphotos.jpg" target="_blank" title="点击查看大图" class="ikqb_img_alink"><img class="ikqb_img" src="http://a.com/zhidao/wh%3D600%2C800/sign=56c829a6fefaafbc64b8d6/1b4c510fd9f9d72af88a919dd72a2834359bbb40.hiphotos,&nbspandroid新手: E://e.hiphotos
检查你的SDK是否安装SDK Build-tool 19.1,如果没有安装一下应该就好了。
其他类似问题
为您推荐:
android的相关知识
其他1条回答
可以删掉的
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁热门搜索:
当前位置:
Pacemaker Practical Math ESL/Ell Teacher Resource Package 2004
所属类别:
所属品牌:
产品简述:精装, Fearon SMARTER图书频道提供大量最新图书,文学作品信息,您在了解的Pacemaker Practical Math ESL/Ell Teacher Resource Package 2004是原版/外语图书行业&&
产品简述: 精装, Fearon SMARTER图书频道提供大量最新图书,文学作品信息,您在了解的Pacemaker Practical Math ESL/Ell Teacher Resource Package 2004是原版/外语图书行业的知名品牌,聪明点为您精心挑选了此款Pacemaker Practical Math ESL/Ell Teacher Resource Package 2004的相关销售商家信息,您可以在本页面轻松获得关于Pacemaker Practical Math ESL/Ell Teacher Resource Package 2004最新报价,精美外形图片,专家评测和用户评论&&
推荐商家:
配送方式:中国邮政平邮、中国邮政挂号信件、中国邮政特快专递(EMS)、快递公司、送货上门
最低价格:
共计:1 家
Pacemaker Practical Math ESL/Ell Te...
本网站为购物搜索引擎,只提供各网站商品及服务信息链接,以商家实际信息为准!
沪ICP证B2-号&沪ICP备号android.content.res.Resources$NotFoundException: Unable to find resource ID #0xffffffff - Stack Overflow
to customize your list.
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.
J it only takes a minute:
Join the Stack Overflow community to:
Ask programming questions
Answer and help your peers
Get recognized for your expertise
I hate posting code, and asking why it doesn't work, but I'm at a loss right now. I've tried to run the following class below, and I get an exception in logcat which I can't explain. Even a google search yields little results. Maybe I just don't understand the ecosystem, but the exception has little information. The exception I'm getting is below:
03-06 21:50:43.031: E/AndroidRuntime(1013): FATAL EXCEPTION: main
03-06 21:50:43.031: E/AndroidRuntime(1013): android.content.res.Resources$NotFoundException: Unable to find resource ID #0xffffffff
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.content.res.Resources.getResourceName(Resources.java:1659)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:903)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1088)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1444)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:461)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:141)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.support.v4.view.ViewPager.populate(ViewPager.java:1012)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.support.v4.view.ViewPager.populate(ViewPager.java:881)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1366)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.view.View.measure(View.java:15513)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4827)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.view.View.measure(View.java:15513)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.widget.LinearLayout.measureVertical(LinearLayout.java:847)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.view.View.measure(View.java:15513)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4827)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2176)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.view.View.measure(View.java:15513)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1874)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1089)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1265)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:989)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4351)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.view.Choreographer.doCallbacks(Choreographer.java:562)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.view.Choreographer.doFrame(Choreographer.java:532)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.os.Handler.handleCallback(Handler.java:725)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.os.Handler.dispatchMessage(Handler.java:92)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.os.Looper.loop(Looper.java:137)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at android.app.ActivityThread.main(ActivityThread.java:5039)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at java.lang.reflect.Method.invokeNative(Native Method)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at java.lang.reflect.Method.invoke(Method.java:511)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
03-06 21:50:43.031: E/AndroidRuntime(1013):
at dalvik.system.NativeStart.main(Native Method)
03-06 21:55:44.231: E/Trace(1033): error opening trace file: No such file or directory (2)
I tried moving the ViewPager to the top level content (i.e. setContent( pager )) but that didn't seem to work. Any input is welcomed. The code is below:
EDIT* I Simplified the example, and I still get the same problem.
import android.os.B
import android.support.v4.app.F
import android.support.v4.app.FragmentA
import android.support.v4.app.FragmentPagerA
import android.support.v4.view.ViewP
import android.view.G
import android.view.LayoutI
import android.view.V
import android.view.ViewG
import android.view.ViewGroup.LayoutP
import android.widget.LinearL
import android.widget.TextV
public class AskQuestionActivity extends FragmentActivity
private static LayoutParams MATCH_PARENT = new LayoutParams( LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT );
protected void onCreate( Bundle savedInstanceState )
super.onCreate( savedInstanceState );
ViewPager pager = new ViewPager( this );
pager.setAdapter( new FragmentPagerAdapter( getSupportFragmentManager() )
public int getCount()
public Fragment getItem( int arg0 )
return new BoardFragment();
setContentView( pager );
public static class BoardFragment extends Fragment
public View onCreateView( LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState )
TextView textView = new TextView( getActivity() );
textView.setText( "Board" );
textView.setGravity( Gravity.CENTER );
LinearLayout layout = new LinearLayout( getActivity() );
layout.setLayoutParams( MATCH_PARENT );
layout.addView( textView );
Any help is welcomed.
So I'll post what I think is the solution to my problem. After adding a single line to my above code giving the ViewPager a "random" ID; it managed to fix my problem.
At first I was convinced that setting your own ID is bad practice, but apparently there are legitimate ways of doing this. Namely by creating an ids.xml file and letting the Android ecosystem generate an ID for you. I recommend checking out these SO posts for more information -
Otherwise, I would recommend just creating an XML file for your layout and getting the ViewPager in your Activity (instead of programmatically instantiating it), but ultimately it all depends on what you're trying to accomplish.
2,67452149
ViewPager pager = new ViewPager(this);
need set resource id
pager.setId(0x1000);
7,219132952
I was having a similar problem with XML layout files that were under the layout folder. The code used to work in eclipse but when the project was moved to Android Studio I kept getting the android.content.res.Resources$NotFoundException.
To fix the problem I ended up renaming the XML files that were causing the problem and that solved the problem. Before that I tried rebuilding the project, making modifications to the XML file but none of that worked.
Exactly same problem.
I programmatically generated a viewpager in a fragment. when the fragment back to foreground it crashed.
Even though, I already generated a random id for the view pager it
still crash. The only way is assign a fixed Id to it. Weird!
I had the same error. Mine was caused by my Adapter class having one extra textView that did not have a matching imageView. I had 7 TextViews and only 6 ImageViews. It took me a couple hours to figure out a simple mistake.
I had the same issue. The problem was the missing layout file. I had put the layout in layout-xlarge folder but not the layout folder. So small screen tablet had that issue. This might give some people a clue.
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you&#39;re looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabled

我要回帖

更多关于 resource.cfg 的文章

 

随机推荐