我的android项目中没有“res / layout /”文件夹(使用eclipse,libGDX)

时间:2014-10-31 08:24:32

标签: android gradle libgdx

我想通过adMob向我的应用添加广告,所以我遵循了本教程:https://developers.google.com/mobile-ads-sdk/docs/admob/fundamentals?hl=de#play

它说:

// Lookup your LinearLayout assuming it's been given
// the attribute android:id="@+id/mainLayout".

但我没有布局!甚至不是布局文件夹!

我尝试了这个解决方案,但它对我不起作用:src folder empty on creating new Android project 已经安装完所有内容并卸载,然后重新安装也无法正常工作。

我想这可能与gradle项目有关。我使用gdx-setup工具创建了项目。但我对Gradle一无所知。

我希望有人可以帮助我。

1 个答案:

答案 0 :(得分:1)

您无需创建布局文件夹即可以编程方式完成。

以我们的开源libgdx游戏为例:

https://github.com/MapleScotDevelopment/LoggerBill