|
There are many versions of Eclipse. Alas, Juno is one version that has more problems (bugs) with Android than other version. I suggest you remove Juno and download and use either Indigo or Kepler versions of Eclipse. They are more "stable" for Android development.
ALSO, if you want to contribute to the community as a way of "paying back to the community", then write an article or go into the forums and help out answering questions. Never attempt to bribe a CP member for an answer to your question. It isn't the done thing.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Strange, I have not come across any problems with Juno.
|
|
|
|
|
OK. Perhaps my Juno was somehow corrupt.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Ok thanks advice taken, thank you very much downloading Kepler now
|
|
|
|
|
In my experience, when the R.java file cannot be created, it usually means a problem with one or more .xml files. It likely won't help to refresh/clean the project if a .xml file is in error, as the R.java file will still fail to get created.
Have you looked at the Problems tab?
Another thing to try is to open each (layout) .xml file and click the Graphical Layout tab. It will complain about stuff that the other tab will not.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Thank you very much sir i have switched IDE's over to Eclipse Indigo and have same error. Its just the raw file only can you please help me resolve this error? Below is the code maybe you can show me where I went wrong seems like every ide I have this only error. Thank you for your input and can you please help me get past this.
package com.scseriestest;
import android.app.Activity;
import android.os.Bundle;
import android.media.MediaPlayer;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class ScSeriesTest extends Activity implements MediaPlayer.OnCompletionListener {
Button mPlay;
MediaPlayer mPlayer;
<@Override />
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mPlay = new Button(this);
mPlay.setText("Play Sound");
mPlay.setOnClickListener(playListener);
setContentView(R.layout.activity_main);
}
<@Override />
public void onDestroy() {
super.onDestroy();
if(mPlayer != null) {
mPlayer.release();
}
}
private View.OnClickListener playListener = new View.OnClickListener() {
<@Override />
public void onClick(View v) {
if(mPlayer == null) {
try {
mPlayer = MediaPlayer.create(ScSeriesTest.this, R.raw.scs);
mPlayer.start();
} catch (Exception e) {
e.printStackTrace();
}
} else {
mPlayer.stop();
mPlayer.release();
mPlayer = null;
}
}
};
<@Override />
public void onCompletion(MediaPlayer mp) {
mPlayer.release();
mPlayer = null;
}
}
Next Main XML ( hand coded this in notepad first then pasted)
="1.0"="utf-8"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Now Playing..."
/>
<VideoView
android:id="@+id/videoView1"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<ImageView
android:id="@+id/coverImage"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="centerInside"
/>
</LinearLayout>
Android Manifest
="1.0"="utf-8"
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.scseriestest"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="22" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".ScSeriesTest"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
modified 17-May-15 3:06am.
|
|
|
|
|
|
Being a noobie in android development ,I want the code for screen touch input of the phone.
|
|
|
|
|
Sorry, this is not the right place to ask for code. This forum is intended for providing answers to specific programming questions; requesting code isn't one. Please ask Google.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
|
Hitesh Goel wrote: I want the code for... Not the right question to ask. You write the code, or at least make an attempt at such, and we'll be glad to critique.
Hitesh Goel wrote: ...screen touch input of the phone. What exactly does this mean?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
do you mean script for touching screen such as clicks and swipes??
|
|
|
|
|
yes I mean to be asking for a script or code to block the touch on my screen.
|
|
|
|
|
|
Sorry. Seeing "...gestures/index..." in your link makes me want to look for other finger gestures.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
|
I need to develop app to convert pdf to image ,is any free library available for pdf to image converter and any tutorial to develop.
|
|
|
|
|
|
thanks for this useful tips!
|
|
|
|
|
When the following code runs, an exception occurs at the setImageResource line. When I debug it, the right after that line the debugger jumps to the finally part, and then it goes into some java code in Runtimeinit.java to a method called private static class UncaughtHandler implements Thread.UncaughtExceptionHandler If I remark the finally section, then the exception is not caught by the catch part?
Why isn't the catch part working? Isn't "catch (Exception ex)" supposed to catch any type of exception?
try {
ImageView imageV = (ImageView) findViewById(R.id.imageView);
Log.i(TAG, "before setImageResource");
imageV.setImageResource(R.drawable.merle);
} catch (Exception ex) {
Log.e(TAG,ex.getMessage().toString());
} finally {
Log.i(TAG,"finally");
}
|
|
|
|
|
Solved by adding a catch for Throwable
try {
ImageView imageV = (ImageView) findViewById(R.id.imageView);
Log.i(TAG, "before setImageResource");
imageV.setImageResource(R.drawable.merle);
} catch (Exception ex) {
Log.e(TAG,ex.getMessage().toString());
} catch (Throwable ex) {
Log.e(TAG,ex.getMessage().toString());
}
finally {
Log.i(TAG,"finally");
}
|
|
|
|
|
But why u put this code in try, catch block.
Check your layout that present this imageview which id is R.id.imageView.
|
|
|
|
|
But why you put this code on try and catch block. Firat see your layout and check that the imageview with id R.id.imageView is contain or not.
|
|
|
|
|
It was just a test code. I was more interested in understanding why the try/catch did not work. The imageView was less of a concern in this excercise.
Once I was able to trap the error , it turned out to be "not enough memory" because the bitmap I was using was too big.
|
|
|
|
|
please help me..
how do I create a database chart engine ..
please. please help if anyone can
|
|
|
|