dint-dev / cryptography

Cryptography for Flutter developers: encryption, digital signatures, key agreement, etc.
https://pub.dev/packages/cryptography
Apache License 2.0
161 stars 82 forks source link

New flutter project fails with error #183

Open JohnGalt1717 opened 4 months ago

JohnGalt1717 commented 4 months ago

Steps: flutter doctor - all green flutter create test cd test flutter build app_bundle (successful) flutter pub add cryptography_flutter flutter build app_bundle

error:


* What went wrong:
A problem occurred configuring project ':cryptography_flutter'.
> Could not resolve all files for configuration ':cryptography_flutter:classpath'.
   > Could not find com.android.tools.build:gradle:8.7.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/8.7/gradle-8.7.pom
       - https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/8.7/gradle-8.7.pom
     Required by:
         project :cryptography_flutter
> Failed to notify project evaluation listener.
   > Could not get unknown property 'android' for project ':cryptography_flutter' of type org.gradle.api.Project.
   > Could not get unknown property 'android' for project ':cryptography_flutter' of type org.gradle.api.Project.

There's nothing in the documentation that would indicate steps required to make this work with some changes. But I tried updating to gradle 8.7 in gradle-wrapper.properties and it still errors.

Also there is no such thing as android tools 8.7, 8.4 is the latest.

JohnGalt1717 commented 4 months ago

I was able to sort of get around this be going into the package cache for this library and adding this to the build.gradle:

namespace "dev.dint.cryptography_flutter"

That eliminated the error. There are TONS of depreciation warnings though from this library.

rewired-gh commented 4 months ago

I was able to sort of get around this be going into the package cache for this library and adding this to the build.gradle:

namespace "dev.dint.cryptography_flutter"

That eliminated the error. There are TONS of depreciation warnings though from this library.

Also need to remove package property in AndroidManifest.xml

ugran commented 1 week ago

Same warning here +1