为了加密我的sharedpreferences,我想在我的应用程序中实现androidx.security。 在构建依赖关系时,我几乎没有遇到什么问题,但最终应用程序还是运行了。 然后,当我到达I EncryptedSharedPreferences.create的那一行时,我得到以下错误: java.lang.NoSuchMethodError: No static method registerDefaultInstance(Ljava/lang/Class;Lcom/google/protobuf/GeneratedMessageLite;)V in class Lcom/google
我需要加密我的SharedPreferences,所以我决定尝试使用:
implementation 'androidx.security:security-crypto:1.0.0-rc01'
它需要至少23个Sdk,所以我更改了我的应用程序以与其兼容。
现在我得到了一堆红线,如下所示:
Duplicate class com.google.protobuf.Timestamp$1 found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11
在更新我的一个firebase SDK后,我收到此错误
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class com.google.protobuf.AbstractMessageLite found in modules
我尝试使用protobuf,但不知怎么链接失败了(这里只是代码片段):
Linking CXX executable app
CMakeFiles/app.dir/msg.pb.cc.o: In function `evoswarm::protobuf_AssignDesc_a_5fto_5fb_2eproto()':
msg.pb.cc:(.text+0x133): undefined reference to `google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
我正在尝试编译google protobuf协议,以便在我的iOS 5项目中使用它,但还没有成功……我只找到了一篇关于主题的博客文章。但是当我尝试这个方法时,我收到了错误:
h-3.2# make
make all-recursive
Making all in .
make[2]: Nothing to be done for `all-am’.
Making all in src
protoc -I. –cpp_out=. google/protobuf/unittest.proto google/protobuf/unittest_empty.proto google/protobuf/
我一直在尝试使用ndk-build来获取我的用于Android开发的protobuf库,但我总是遇到一些问题。我从另一个堆栈溢出线程获得了我的Android.mk文件,它似乎不能工作。我是.mk的新手,完全不知道自己在做什么。
我在这个问题上也找到了这个:
在那个帖子中,他们指出有一行代码末尾的空格太多,所以我梳理了自己的文件,但找不到问题的根源。我明白了:
make: *** No rule to make target `C:/Users/jkarr/Downloads/protobuf-
master/jni/google/protobuf/arena.cc', needed b
我开始尝试在android上使用gRPC并添加所有的依赖项。当我想要运行这个项目时,我会得到以下错误。这是我第一次在安卓系统中实现gRPC,从一开始它就开始变得恼人。
Duplicate class com.google.protobuf.AbstractMessageLite found in modules protobuf-javalite-3.17.2 (com.google.protobuf:protobuf-javalite:3.17.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
D
我有一个项目,我同时使用了FirebaseInAppMessaging和Dialogflow,但我很难解决这些依赖关系。在添加了FirebaseInAppMessaging和Dialogflow之后,我得到了以下错误:
Duplicate class com.google.protobuf.AbstractMessageLite found in the following modules: jetified-protobuf-java-3.11.3.jar (com.google.protobuf:protobuf-java:3.11.3), jetified-protobuf-javali
最近在我的android项目中添加了Firebase-Firestore,在构建过程中,我开始获得对protobuf中的类的重复引用。 build.gradle // Top-level build file where you can add configuration options common to all
// sub-projects/modules.
buildscript {
ext.protobufVersion = '0.8.6'
repositories {
google()
jcenter()
我正在使用来自的Protoc-3.18.0-Win 32版本。成功编译.proto文件后,QtCreator 5 (C++11)程序中出现以下错误:
C:\Users\MyName\MyProject\lib\include\google\protobuf\stubs\mutex.h:124: error: temporary of non-literal type 'google::protobuf::internal::CallOnceInitializedMutex<std::mutex>' in a constant expression
In file i
当前有一些来自构建的输出如下:
Retrieving com/google/protobuf/protobuf-java/3.3.0/protobuf-java-3.3.0.jar from central
Retrieving com/google/protobuf/protobuf-java-util/3.3.0/protobuf-java-util-3.3.0.jar from central
Could not find artifact com.google.protobuf:protoc:jar:3.3.0 in central (https://repo1.maven.org/m
当我添加com.google.firebase:firebase-config:19.1.0以使用firebase远程配置时,遇到了这个问题。
java.lang.RuntimeException: Duplicate class com.google.protobuf.AbstractMessageLite found in modules protobuf-java-2.5.0.jar (com.google.protobuf:protobuf-java:2.5.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-l
我正在尝试将一些数据从protobuf连接到json。
以下是我的代码的相关部分:
Message* m;
std::string json;
std::string binary_s;
...fill the message...
m->serializeToString(&binary_s);
MessageToJsonString(*m, &json);
下面的指令运行良好,并产生了预期的输出。
m->serializeToString(&binary_s);
但当我尝试将其转换为json时,总是出现以下错误:
Program received si
在查看存储库之后,我正在尝试编译TensorFlow。我已经到了被google协议错误困扰的地步:
INFO: From Compiling tensorflow/core/kernels/histogram_op_gpu.cu.cc:
./tensorflow/core/lib/core/status.h(32): warning: attribute "warn_unused_result" does not apply here
external/protobuf_archive/src/google/protobuf/arena.h(719): error: more