我一直面临这个问题。
我试过
1) ./gradlew clean -> npm i -> expo i
2)将此行添加到 build.graddle(:app)
Run Code Online (Sandbox Code Playgroud)multiDexEnabled true
3)将此行添加到 build.graddle(project)
maven {
url "$rootDir/../node_modules/expo-camera/android/maven"
}
Run Code Online (Sandbox Code Playgroud)
但没有任何作用。
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:mergeDebugAssets'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not find com.google.android:cameraview:1.0.0.
Searched in the following locations:
- file:/Users/hayat/.m2/repository/com/google/android/cameraview/1.0.0/cameraview-1.0.0.pom
- https://dl.google.com/dl/android/maven2/com/google/android/cameraview/1.0.0/cameraview-1.0.0.pom
- https://repo.maven.apache.org/maven2/com/google/android/cameraview/1.0.0/cameraview-1.0.0.pom
- https://devrepo.kakao.com/nexus/content/groups/public/com/google/android/cameraview/1.0.0/cameraview-1.0.0.pom
Required by:
project :app > project :expo > project :expo-camera
> Could not find com.github.CanHub:Android-Image-Cropper:1.1.1.
Searched in the following locations:
- file:/Users/hayat/.m2/repository/com/github/CanHub/Android-Image-Cropper/1.1.1/Android-Image-Cropper-1.1.1.pom
- https://dl.google.com/dl/android/maven2/com/github/CanHub/Android-Image-Cropper/1.1.1/Android-Image-Cropper-1.1.1.pom
- https://repo.maven.apache.org/maven2/com/github/CanHub/Android-Image-Cropper/1.1.1/Android-Image-Cropper-1.1.1.pom
- https://devrepo.kakao.com/nexus/content/groups/public/com/github/CanHub/Android-Image-Cropper/1.1.1/Android-Image-Cropper-1.1.1.pom
Required by:
project :app > project :expo > project :expo-image-picker
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
Run Code Online (Sandbox Code Playgroud)
如何解决这个问题?请帮我。
遇到了同样的问题,并通过将以下代码块添加到我的android\build.gradle文件中来解决它。
allprojects {
repositories {
// * Your other repositories here *
maven {
// expo-camera bundles a custom com.google.android:cameraview
url "$rootDir/../node_modules/expo-camera/android/maven"
}
}
}
Run Code Online (Sandbox Code Playgroud)
注意我认为这里给出的说明有点误导。您必须添加整个代码块。我只是添加了下面的代码块,但没有成功。只有在添加上面的整个块之后我才能成功构建我的项目
maven {
// expo-camera bundles a custom com.google.android:cameraview
url "$rootDir/../node_modules/expo-camera/android/maven"
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3650 次 |
| 最近记录: |