글쎄, 지난 며칠 동안 보였을 것입니다. 주제에 관한 거의 모든 위협을 읽었지만 아무도 효과가 없었습니다!R을 해결할 수 없습니다 (또 다른)
방금 새 앱을 개발하기 시작했으며 프로젝트를 만든 즉시 오류가 표시됩니다.
최후의 수단으로 만 동료 (또는 gal :))가 내 응용 프로그램 기능을 방해 할 수있는 문제를 발견 할 수 있는지 여부를 친절하게 관찰 할 수 있습니까?
MainApplication.java;
package com.sony.thirdtest;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.view.View;
import android.widget.Toast;
import com.sony.smallapp.SmallAppWindow;
import com.sony.smallapp.SmallApplication;
public class MainApplication extends SmallApplication {
private Configuration mConfig;
@Override
public void onCreate() {
super.onCreate();
mConfig = new Configuration(getResources().getConfiguration());
setContentView(R.layout.activity_main);
setTitle(R.string.app_name);
SmallAppWindow.Attributes attr = getWindow().getAttributes();
attr.minWidth = 200;
attr.minHeight = 200;
attr.width = 400;
attr.height = 300;
attr.flags |= SmallAppWindow.Attributes.FLAG_RESIZABLE;
getWindow().setAttributes(attr);
findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(MainApplication.this, R.string.hello, Toast.LENGTH_SHORT).show();
}
});
}
@Override
public void onDestroy() {
super.onDestroy();
}
@Override
public void onStart() {
super.onStart();
}
@Override
public void onStop() {
super.onStop();
}
@Override
protected boolean onSmallAppConfigurationChanged(Configuration newConfig) {
int diff = newConfig.diff(mConfig);
mConfig = new Configuration(getResources().getConfiguration());
// Avoid application from restarting when orientation changed
if ((diff & ActivityInfo.CONFIG_ORIENTATION) != 0) {
return true;
}
return super.onSmallAppConfigurationChanged(newConfig);
}
}
main_activity.xml;
<manifest
package="com.sony.thirdtest"
android:versionCode="1"
android:versionName="1.0"
xmlns:android="http://schemas.android.com/apk/res/android" >
<uses-sdk android:minSdkVersion="14"
android:targetSdkVersion="15" />
<uses-permission android:name="com.sony.smallapp.permission.SMALLAPP" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<uses-library android:name="com.sony.smallapp.framework" />
<service
android:name="MainApplication"
android:exported="true" >
<intent-filter >
<action android:name="com.sony.smallapp.intent.action.MAIN" />
<category android:name="com.sony.smallapp.intent.category.LAUNCHER" />
</intent-filter>
</service>
</application>
나는,이 최후의 수단되었다는
종류의 안부를 명확하게 주시겠습니까.
리소스 파일에 오류가 있습니다. 한 번 교차 확인 하시겠습니까? 이것이 rev 22로 adt를 업데이트 한 후에 발생 했습니까? – Raghunandan
최신 버전의 ADT를 실행 중이므로 그렇게 할 것입니다. 나는 recourse 폴더에있는 유일한 파일은 drawable 폴더에있는 ic_launcher.png입니다. 프로그램에있는 다른 오류는 없습니다. 이 두 가지만 "R" – UKPixie
http://stackoverflow.com/questions/16636039/java-lang-classnotfoundexception-after-changing-nothing-in-the-project-but-upgra/16636127#16636127. 이 시도. 충돌이 발생하면 logcat 정보를 게시 하시길 바랍니다. – Raghunandan