yatatsu / AutoBundle

AutoBundle generates boilerplate code for field binding with android.os.Bundle
Apache License 2.0
135 stars 13 forks source link

Could not resolve com.github.yatatsu:autobundle-processor:1.0.2. #32

Open scuti-dai opened 1 week ago

scuti-dai commented 1 week ago

i maintained the app many year ago and i'm facing this bug, Could you help me check this. thank you.

Could not resolve all files for configuration ':app:enStagingDebugAnnotationProcessorClasspath'.

Could not resolve com.github.yatatsu:autobundle-processor:1.0.2. Required by: project :app Could not resolve com.github.yatatsu:autobundle-processor:1.0.2. Could not get resource 'https://jitpack.io/com/github/yatatsu/autobundle-processor/1.0.2/autobundle-processor-1.0.2.pom'. Could not GET 'https://jitpack.io/com/github/yatatsu/autobundle-processor/1.0.2/autobundle-processor-1.0.2.pom'. Received status code 401 from server: Unauthorized

yatatsu commented 1 week ago

@scuti-dai Sorry, this library is not maintained anymore. It seems that version 1.0.2 has not been distributed on Jitpack.io. How about the latest version? https://jitpack.io/#yatatsu/AutoBundle/5.0.2

Also I highly recommend using Safe Args instead of this library. https://developer.android.com/guide/navigation/use-graph/safe-args

scuti-dai commented 1 week ago

@yatatsu thank you for your reply but this is an old project, so i can't change the library

autobundle is working fine but autobundle-processor is not working

i try version 5.0.2 buts i still error:

Could not GET 'https://jitpack.io/com/github/yatatsu/autobundle-processor/5.0.2/autobundle-processor-5.0.2.pom'. Received status code 401 from server: Unauthorized

Could you try accessing this link to help me check the permission?

Screenshot 2024-09-19 at 14 00 09

yatatsu commented 1 week ago

Could you try accessing this link to help me check the permission?

me too..

I think this is known issue with jitpack.io. https://github.com/jitpack/jitpack.io/issues/4039

scuti-dai commented 1 week ago

i use my mac book pro run project and it's working, but i use a mac M1 and have a bug :))

Could you give me some advice to replace this library?

implementation 'com.github.yatatsu:powerwebview:0.3.1' implementation 'com.github.yatatsu:autobundle:1.0.2' annotationProcessor 'com.github.yatatsu:autobundle-processor:1.0.2'

yatatsu commented 1 week ago

Detailed information on how to use Safe Args can be found in this document:
https://developer.android.com/guide/navigation/use-graph/safe-args.

Or you can fork repos, then use your forked repo with jitpack.io. Have you already tried it?

scuti-dai commented 1 week ago

Or you can fork repos, then use your forked repo with jitpack.io. Have you already tried it?

Yes, but still error Unauthorized

yatatsu commented 1 week ago

I tried adding the dependency as follows, and it worked for me. You might want to check your Gradle configuration.

in build.gradle

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url "https://jitpack.io" }
    }
}

in app/build.gradle

dependencies {
  implementation "com.github.yatatsu:AutoBundle:5.0.2"
  kapt "com.github.yatatsu:autobundle-processor:5.0.2"
}
scuti-dai commented 1 week ago

Could you try annotationProcessor ? The word "kapt" is only for kotlin it was created by Java, not kotlin

in build.gradle me too

allprojects { repositories { google() mavenCentral() maven { url 'https://jitpack.io' } } }

yatatsu commented 1 week ago

As you mentioned, both kapt and annotationProcessor allowed syncing, but the build failed.

scuti-dai commented 1 week ago

yes, the build failed :(((

yatatsu commented 1 week ago

I got it. dependency is wrong. we should declare it like following

implementation "com.github.yatatsu.autobundle:autobundle:5.0.2"
kapt "com.github.yatatsu.autobundle:autobundle-processor:5.0.2"
scuti-dai commented 1 week ago

thanh you so much, i can run it now @yatatsu