Comments (6)
I've seen issues associated with the gradle daemon causing problems to annotation processing, so if it's failing I'd recommend stopping it ./gradlew --stop
and doing a clean build ``./gradlew clean assemble`.
This fixes problems for me 100% of the time. If this still doesn't work for you, please paste your stack trace here with the exact exception.
from deeplinkdispatch.
I'm having this issue when using multiple DeepLinks into a single Activity.
Compiling & Running works fine with either of these two DeepLiinks on their own, just not when combined.
AndroidManfiest.xml
<activity
android:name="com.airbnb.deeplinkdispatch.DeepLinkActivity"
android:theme="@android:style/Theme.NoDisplay">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http"
android:host="mydomain.com"/>
<data android:scheme="mydomain"
android:host="deeplink"/>
</intent-filter>
</activity>
MyActivity.java
@DeepLinks({"http://mydomain.com/deeplink/{id}", "mydomain://deeplink"})
public class MyActivity extends Activity {
}
Exception
07-13 18:36:49.285 1896-1896/com.sample.deeplinksample E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.sample.deeplinksample, PID: 1896
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.sample.deeplinksample/com.airbnb.deeplinkdispatch.DeepLinkActivity}: java.lang.ClassNotFoundException: Didn't find class "com.airbnb.deeplinkdispatch.DeepLinkActivity" on path: DexPathList[[zip file "/data/app/com.sample.deeplinksample-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.airbnb.deeplinkdispatch.DeepLinkActivity" on path: DexPathList[[zip file "/data/app/com.sample.deeplinksample-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.app.Instrumentation.newActivity(Instrumentation.java:1065)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2199)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Suppressed: java.lang.ClassNotFoundException: com.airbnb.deeplinkdispatch.DeepLinkActivity
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 13 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
from deeplinkdispatch.
Unfortunately, I still have the same problem: (package/app name changed)
Process: com.foo.bar.app, PID: 10121
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.foo.bar.app/com.airbnb.deeplinkdispatch.DeepLinkActivity}: java.lang.ClassNotFoundException: Didn't find class "com.airbnb.deeplinkdispatch.DeepLinkActivity" on path: DexPathList[[zip file "/data/app/com.foo.bar.app-1/base.apk"],nativeLibraryDirectories=[/data/app/com.foo.bar.app-1/lib/arm, /vendor/lib, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2328)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2477)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1345)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5415)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:725)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:615)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.airbnb.deeplinkdispatch.DeepLinkActivity" on path: DexPathList[[zip file "/data/app/com.foo.bar.app-1/base.apk"],nativeLibraryDirectories=[/data/app/com.foo.bar.app-1/lib/arm, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.app.Instrumentation.newActivity(Instrumentation.java:1067)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2318)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2477)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1345)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5415)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:725)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:615)
Suppressed: java.lang.ClassNotFoundException: com.airbnb.deeplinkdispatch.DeepLinkActivity
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 12 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
I did what is described in Usage and added a @DeepLinks
annotation to one of my activities. The activity part in the AndroidManifest has DeepLinkActivity shown in red as the symbol could not be resolved (which fits with the exception being thrown).
I tried what you suggested (gradlew --stop, gradlew clean assemble) but that didn't change the behaviour.
from deeplinkdispatch.
@PattaFeuFeu be sure you're using 1.3.0-SNAPSHOT as a new release hasn't been made with the fix.
Note I'm still having an issue with this (need to do more testing) but the latest SNAPSHOT release does fix the ClassNotFoundException for me.
from deeplinkdispatch.
@Denvar is right. This fix is only included in the latest snapshot release (1.3.0-SNAPSHOT) for now
from deeplinkdispatch.
I tried to use
compile 'com.airbnb:deeplinkdispatch:1.4.0-SNAPSHOT'
apt 'com.airbnb:deeplinkdispatch-processor:1.4.0-SNAPSHOT'
With no luck
from deeplinkdispatch.
Related Issues (20)
- Migration to androidX HOT 2
- Not supported valid URIs for deeplinks with same path and different number of parameters HOT 4
- [Question] Get DeeplinkResult without launching activity HOT 2
- Support KSP HOT 1
- An annotation argument must be a compile-time constant HOT 3
- Deep linking integration is Fails with error
- Binary incompatible API change in 5.4.0. HOT 1
- Support for AndroidX Navigation HOT 2
- Pipe(|) separated custom annotators not recognised
- Allow Serializable/Parcelable through intents HOT 8
- Deeplink for search accommodations in a specific place
- DeepLinkHandler<T> interface is not available in latest version i.e. 5.4.3
- Add @DeepLinkModuleRegistry marker annotation to generated registries
- Performance issue in chunkOnModifiedUtf8ByteSize
- queryParameterValue must not be null HOT 4
- Help for using with Java
- DeepLinkIntentsUtil not found exception
- Can i use uri-fragment ( # ) field access directly from bundle?
- Custom Annotations not working after update to v6.1.0 HOT 2
- Not compatible with Hilt HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deeplinkdispatch.