I have used this library project in my app [Scan document library]
I have also included OpenCv android SDk in my app.
The app is getting compiled fine. After running, onclick of scan button ,
The ScanActivity is not getting recognised. It gives following error:
android.content.ActivityNotFoundException: Unable to find explicit
activity class {com.myapptest/com.scanlibrary.ScanActivity}
Related
when trying to add notification in mt app im getting this error
i tried Suddenly unable to build android studio project error: cannot access zzbcc
build-android-studio-project-error-cannot-access-zzbcc
and also Cannot access ActivityCompatApi23 class
activitycompatapi23-class?rq=1 but no use
I want to extract Text from image simply implement OCR(Optical Character Recognition) in Android using Library LEPTONICA and TESSERACT.I have succesfully added the open source library to my sample project But when i am running my application but on run time app force closes and error was .... ExceptioninInitialization UnspecifiedLink Error...Library Not found
Any suggetion how to resolve this error...I am stuck on this
I have a problem with the new ActionBarSherlock.
I have to link it to my project and use it's features (Fragments, etc), in a project that supports android API level 7 and above.
I have created a module in intelij with my project, and I've linked the ActionBarSherlock library project to it. Everything looks good, the project rebuilds correctly, deploy a valid apk to emulator, but when I'm trying to run the application I got something like this:
WARN/dalvikvm(540): Unable to resolve superclass of Lcom/mobileinsight/common/CustomActivity; (134)
WARN/dalvikvm(540): Link of class 'Lcom/mobileinsight/common/CustomActivity;' failed
WARN/dalvikvm(540): Unable to resolve superclass of Lcom/mobileinsight/ui/SplashActivity; (175)
WARN/dalvikvm(540): Link of class 'Lcom/mobileinsight/ui/SplashActivity;' failed
WARN/dalvikvm(540): threadid=3: thread exiting with uncaught exception (group=0x4001b188)`
ERROR/AndroidRuntime(540): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.mobileinsight/com.mobileinsight.ui.SplashActivity}: java.lang.ClassNotFoundException: com.mobileinsight.ui.SplashActivity in loader dalvik.system.PathClassLoader#45f352e8
I get the error when the application tries to instantiate an activity that extends SherlockActivity or FragmentSherlockActivity
Somebody can help me with this?
Thanks,
Ark
Alright, I have been messing with this for a few hours now, and I can't figure out why I'm having issues.
I have been following the example from
http://xebee.xebia.in/2010/08/31/exploring-android-charting-and-graphs-solutions/
AND
I have already tried to create a fix using this link:
Android achartengine simple pie chart
AND
I have tried using the demo that achartengine provides Here.
But that project crashed immediately after selecting a chart type on my android device.
I am new to android, and have followed those two resources almost exactly, and I'm getting this:
Conversion to Dalvik format failed with error 1
None of my src files are showing up with errors, and I have added the new activity in AndroidManifest.xml and achartengine-1.0.0.jar into my libs folder
I am using Android 4.0.3 API Level 15
I can't believe I am having this much trouble with such a seemingly simple task, but I appreciate your help.
EDIT:
this is a snippit from my log:
07-04 17:03:58.650: E/AndroidRuntime(21611): FATAL EXCEPTION: main
07-04 17:03:58.650: E/AndroidRuntime(21611): java.lang.RuntimeException: Unable to start activity ComponentInfo{axiodesigns.com.caffeinezone2/axiodesigns.com.caffeinezone2.CzMain}: android.content.ActivityNotFoundException: Unable to find explicit activity class {axiodesigns.com.caffeinezone2/org.achartengine.GraphicalActivity}; have you declared this activity in your AndroidManifest.xml?
I have no activity called GraphicalActivity, and even after i added:
<activity android:name="GraphicalActivity"></activity>
I received the exact same error
quite a headscratcher
Found the fix, my build path was not recognizing that I had the .jar in my libs folder.
This fixed it:
The application AChartengine has stopped unexpectedly. Please try again
Thanks for the help all
I have the following setup:
LibProjectWithActivity - an android library project which contains PreviewActivity
AppProject - usual Android Project which uses LibProjectWithActivity
AppProjectTest - an Android JUnit Test Project which is an ActivityInstumentationTestCase2
First of all: all basic dependencies are set up correctly, because I can perfectly launch my app in emulator, it shows PreviewActivity just ok, things work - no problems here.
But I fail to launch the test... Here's the setup:
public class PreviewActivityTest
extends ActivityInstrumentationTestCase2<PreviewActivity> {
public PreviewActivityTest() {
// note: if i put "com.the7art.libprojectwithactivity" instead it wont find it
// and will fail with "activity not found"
super("com.the7art.appproject", PreviewActivity.class);
}
public void testDummy() {
getActivity();
}
}
This throws a NullPointerException like this:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.the7art.appproject/com.the7art.libprojectwithactivity.PreviewActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
.......
Caused by: java.lang.NullPointerException
at com.the7art.libprojectwithactivity.PreviewActivity.onCreate(PreviewActivity.java:37)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
... 11 more
Here are lines PreviewActivity.java:36,37:
mButtonAdd = (Button) findViewById(R.id.button_add);
mButtonAdd.setOnClickListener(this);
So what this exception means is that R.id.button_add (which is in a libproject) is perfectly found, but the view by this id can't be found. If I comment out this code, it'll crash similarly when trying to obtain another resource.
Looks like test uses right R.java, but wrong Context object. Or something like this.
Again, the app code is ok, because it works in emulator, something is wrong with test setup...
Any hints on what is wrong and how to fix this?
Yes the test can be only use the Activity project as a target, look at the projectTarget in your Test manifest file.
This means that your test can use the same context as your application does. Accessing only the application's project resources. However, you can't access Library's project resources, you can use the R.string.XX from the library's project because this was first built it, and it's only a generated identifier that will be used in the application's context to find the resource. So the result will be an mistake in the resource found or a resource not found exception.
There are 2 ways to test a library project, here they are