android-library

Android Activity ClassNotFoundException - tried everything

僤鯓⒐⒋嵵緔 提交于 2019-12-16 20:01:11
问题 I've just refactored an app into a framework library and an application, but now when I try and start the app in the emulator I get the following error stack trace: 06-02 18:22:35.529: E/AndroidRuntime(586): FATAL EXCEPTION: main 06-02 18:22:35.529: E/AndroidRuntime(586): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.matthewrathbone.eastersays/com.matthewrathbone.eastersays.EasterSimonSaysActivity}: java.lang.ClassNotFoundException: com.matthewrathbone

Android Activity ClassNotFoundException - tried everything

梦想的初衷 提交于 2019-12-16 20:01:00
问题 I've just refactored an app into a framework library and an application, but now when I try and start the app in the emulator I get the following error stack trace: 06-02 18:22:35.529: E/AndroidRuntime(586): FATAL EXCEPTION: main 06-02 18:22:35.529: E/AndroidRuntime(586): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.matthewrathbone.eastersays/com.matthewrathbone.eastersays.EasterSimonSaysActivity}: java.lang.ClassNotFoundException: com.matthewrathbone

Try to start library project Activity

非 Y 不嫁゛ 提交于 2019-12-14 01:09:21
问题 I have a library project and Main project and I try to start the activity that is defined in library project from main project. Intent intent = new Intent("isr.LAUNCH"); intent.setComponent(new ComponentName("com.ISR", "com.ISR.activity.CameraActivity")); startActivity(intent); But I receive the following exception: 05-14 17:13:42.853: E/AndroidRuntime(29217): java.lang.SecurityException: Permission Denial: starting Intent { act=isr.LAUNCH cmp=com.ISR/.activity.CameraActivity } from

ClassNotFoundException when trying to access a View in a Library project

老子叫甜甜 提交于 2019-12-13 18:34:02
问题 I have a library project I'm importing in other project. When I try to compile it, console says this (in red): [2012-07-11 13:12:53 - Library] Could not find Library.apk! This library contains some custom Views, and when I try to access one of them, it gives me this a Java.lang.RuntimeException caused by a android.view.InflateException which at the same time is caused by a java.lang.ClassNotFoundException on the View class on the Library. Does anybody know how to solve this? Here is the

Launch Android application from Library project

こ雲淡風輕ζ 提交于 2019-12-13 16:27:11
问题 I am developing the PushNotification for android application in Android Library. I am unable to launch the android application while clicking the push notification message. I am unable to fetch the android application class in library project for launch in generatePushNotification() method. The following is the code snippet from library project. private static void generateNotification(Context context, String message) { int icon = R.drawable.ic_launcher; long when = System.currentTimeMillis()

Reusing the same code across multiple Android Studio projects

大兔子大兔子 提交于 2019-12-13 13:49:17
问题 I have some code I'd like to use across multiple different projects. Let's say it's some e-commerce code that handles things like payments and shopping carts. It seems inefficient and dangerous to copy-paste everything across different projects. And if I add one feature or fix one bug in the core e-commerce module, I'd like that change to be reflected in other projects using it too. I would also like to re-use some of the Activities, Fragments, Adapters too. What is a good approach to this?

Convert a string into mathematical function of x :f(x)? [closed]

拥有回忆 提交于 2019-12-13 05:24:26
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . Hello I'm a beginner in Android programming. I'm working on a graphic calculator but i still have the problem of converting the function to math For example : y=cos(x^2)-ln(x) should look like y=Math.cos(x*x) - Math.log(x) And than we plot it. Thank You 回答1: I assume you want to

How to merge two Android-Studio project's

爱⌒轻易说出口 提交于 2019-12-13 03:09:31
问题 i know this question has been asked several times. but i had to find out that it was a long time ago and there were no solutions. so my question: i have a big project "A", for this project i have made and tested a subproject "a" in a separate app. Now I want to bring these projects together or rather inform, project "a" in "A". what's the best approach? 回答1: You can import your second project as a Gradle Project to your first Android Studio Project. You can import project via: 1.a. From

Would you like to integrate a POJO- or Cursor-based library in your android app?

拜拜、爱过 提交于 2019-12-13 02:09:13
问题 My company wants to publish a library for android, so that other people can integrate our content easily in their custom apps. Now I am still very uncertain how I should provide the content. Right now I am using POJOs to provide the data in my project. I was following the debate "POJOs vs. Cursors" which turned out in favor of Cursors. I also have seen an example where somebody stores the parsed resource in a SQLLite-DB and accesses it later through Cursors. I know that Cursors have many

Obfuscating Android Library Project source code with ProGuard

浪子不回头ぞ 提交于 2019-12-12 22:19:29
问题 I am developping an Android Library Project with Eclipse that I want to licentiate. To prevent my clients to easily reverse-engineer and read my code, I want to obfuscate the source code of my library. From the research I did, I found that ProGuard seems to be conciderated the best for my usage. I've seen a post from Eric Lafortune (ProGuard's creator) that tells that library projects don't run ProGuard, and this is confusing me. Why would it work with Android Application Projects and not