这个问题是在我决定向房间数据库添加另一个实体之后出现的。架构正在预期的目录中导出。所有 build.gradle 设置都已完成并且似乎正在工作但没有。自从我得到:
java.io.FileNotFoundException: Cannot find the schema file in the assets folder. Make sure to include the exported json schemas in your test assert inputs.
See https://developer.android.com/training/data-storage/room/migrating-db-versions#export-schema for details. Missing file: com.company.companyapp.db.AppStore/1.json
Run Code Online (Sandbox Code Playgroud)
实际上,正在生成两个 json 模式,但测试运行程序无法找到此类文件。这是gradle设置:
testOptions.unitTests.includeAndroidResources = true
defaultConfig {
...
multiDexEnabled true
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/store".toString()]
}
}
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
android.compileOptions.sourceCompatibility 1.8
android.compileOptions.targetCompatibility 1.8
}
sourceSets {
androidTest.assets.srcDirs += files("$projectDir/store".toString())
}
dependencies {
def roomVersion = '2.2.1'
// Other deps ...
implementation "androidx.room:room-runtime:$roomVersion"
implementation …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用GoogleidentityToolkit库来处理登录的事情.我启用了use_frameworks!在我的pod文件上,但无法找到模块GITkit.我想知道发生了什么.据我所知,如果使用"use_frameworks",则不需要创建任何桥接头文件,因为cocoapods将库编译成单个模块,因此稍后您可以像往常一样导入*.swift文件.
在Swift中使用Google Identity Toolkit库需要什么?
在CocoaPods 1.0.0发布一周后(在CocoaPods 0.39.0仍然流行的时候)提出了这个问题,并且2015年可用版本的Google Identity Toolkit为1.1.3,但已被弃用以支持Firebase身份验证(pod 'FirebaseUI/Auth')遵循Google I/O 2016.
我正在使用Goole App Engine构建我的REST API,我已经将我的类标记为PersistenceCapable,并且我已经定义了我的@PrimaryKey并且还标记为@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY),我也已经使用了EndPoints产生.但是当我在终端窗口中键入一个curl命令来插入一个新的实体或注册表它不起作用.这是代码:
@PersistenceCapable(identityType = IdentityType.APPLICATION)
class Student{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;
private String studentName;
....
....
....
}
Run Code Online (Sandbox Code Playgroud)
这是来自我本地服务器的curl命令和响应.当我尝试插入一个新实体
curl -H 'Content-Type: application/json' -d'{"studentName": "myname"}' htto://localhost:8889/_ah/api/utp/v1/student
Run Code Online (Sandbox Code Playgroud)
这是本地服务器的响应.
"error" : {
"message" : "javax.jdo.JDOFatalInternalException: El valor de llave dado para construir una identidad de SingleFieldIdentity de tipo \"class javax.jdo.identity.LongIdentity\" para la clase \"class com.alex.wserver.Student\" es nulo.\nNestedThrowables:\norg.datanucleus.exceptions.NucleusException: El valor de llave dado para construir una identidad de SingleFieldIdentity de …Run Code Online (Sandbox Code Playgroud) 由于部署失败,我正在尝试回滚,我的服务器代码在java上,而且我正在使用App Engine Eclipse PlugIn.我的appcfg.sh文件位于/Applications/eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.7.5/appengine-java-sdk-1.7.5/bin/appcfg.sh
但是当我尝试这个时,我得到"命令未找到" sudo /Applications/eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.7.5/appengine-java-sdk-1.7.5/bin/appcfg.sh rollback /Documents/workspace/server_side/war
我无法意识到什么是错的.我不知道是否是正确的appcfg,因为有appcfg.cmd和appcfg.sh,我正在使用imac(Unix enviro)所以我使用appcfg.sh进行回滚.我试过几种不同的方式.并没有什么好事发生.也许我错过了什么.谢谢!