2017-08-17 25 views
-2
@Override 
protected void onCreate(Bundle savedInstanceState) 
{ 
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.activity_selection); 
    Chartboost.startWithAppId(this, 
     getResources().getString(R.string.appId), 
     getResources().getString(R.string.appSignature)); 
+2

你的问题还不清楚。这里的“查找位置”是什么意思? – CommonsWare

+0

请清楚提问你的问题。 – Raja

回答

0

您是否从资源获取字符串?

我做到这一点...

我创建了一个方法

public static String showStringResource(int resource) { 
    return getApplicationContext().getResources().getString(resource); 
} 

然后我就可以调用这个方法在我的活动。

showStringResource(R.string.helloworld);
0

R.string.appSignatureR.string.appId是:

Resource -> Values -> String

R.layout.activity_selection是:

Resource -> Values -> Layout