use forName instead..
something like this..
try {
Class<?> act = Class.forName("com.bla.TestActivity");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
More Related Contents:
- Creating new Android (Java ) file in Existing Android package [closed]
- Error inflating when extending a class
- Android Unable to instantiate activity: Didn’t find class on path
- How can I start a new android activity using class name in a string?
- Curly braces in “new” expression? (e.g. “new MyClass() { … }”)
- SRC folder in Eclipse is empty (MainActivity class not created) after creating a new android project using Eclipse
- Can we instantiate an abstract class directly? [duplicate]
- Android Call a method from another class
- Class must either be declared abstract or implement abstract method error
- Writing to a file errors – Android Studio
- Display Animated GIF
- Error:Execution failed for task ‘:app:dexDebug’. com.android.ide.common.process.ProcessException
- Why I cant use the populateViewHolder override method?
- Android Layout with ListView and Buttons
- What kind of OCR Java library should I use in Android? [closed]
- Android: How to use download manager class?
- Convert String to Uri
- Android calculate days between two dates
- Internet listener Android example
- How can I crop a bitmap for ImageView?
- How to hide a View programmatically?
- Android get date before 7 days (one week)
- Android – set TextView TextStyle programmatically?
- Select multiple images from Photo Gallery on Android using Intents
- How do I detect the heap size usage of an android application
- Getting difference between two dates Android
- ArrayList not updating inside onChildAdded function
- Why declare a function argument to be final?
- Determine whether .class file was compiled with debug info?
- Fatal Exception: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 6: TypedValue{t=0x2/d=0x101009b a=1}