Google app engine 无法在android studio中导入后端模块的cloudendpoint库
我创建了一个包含端点类的后端模块。它还有包含endpointapi类的库。在编译期间,我能够在应用程序的MainActivity文件中导入该模块的类及其库。但是,在运行时,它无法检测模块库中存在的类。可能是什么问题 运行代码时出现如下错误:Google app engine 无法在android studio中导入后端模块的cloudendpoint库,google-app-engine,google-cloud-endpoints,android-module,Google App Engine,Google Cloud Endpoints,Android Module,我创建了一个包含端点类的后端模块。它还有包含endpointapi类的库。在编译期间,我能够在应用程序的MainActivity文件中导入该模块的类及其库。但是,在运行时,它无法检测模块库中存在的类。可能是什么问题 运行代码时出现如下错误: Error:(10, 66) error: package com.example.shashank_pc.myapplication.backend.tempClassApi does not exist 项目内部后端模块的文件夹结构如下: Error:
Error:(10, 66) error: package com.example.shashank_pc.myapplication.backend.tempClassApi does not exist
项目内部后端模块的文件夹结构如下:
Error:(10, 66) error: package com.example.shashank_pc.myapplication.backend.tempClassApi does not exist
由于某些原因,后端库中的类(如tempClassApi和myApi文件夹中的类)未被检测到
设置渐变文件:
include ':app', ':backend'
应用程序模块渐变生成文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.example.shashank_pc.testcloudendpoints"
minSdkVersion 22
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'com/google/appengine/repackaged/org/apache/commons/codec/language/bm/*'
exclude 'com/google/appengine/repackaged/org/codehaus/jackson/impl/*'
exclude 'com/google/appengine/repackaged/org/apache/commons/codec/language/*'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
{
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.code.findbugs:jsr305:2.0.1'
testCompile 'junit:junit:4.12'
compile project(':backend')
}