2017-10-04 2 views
2

개체 상자 버전 1.1.0을 사용하고 있습니다. ObjectBox의 설명서에 제공된 지침과 함께 설치되었지만이 오류가 발생했습니다. 심지어 Objectbox의 FAQ 섹션에서이 문제를 검색했습니다. 제공되는 솔루션은 android-apt를 제거하는 것입니다. 그러나 gradle 파일에는 안드로이드가 사용되지 않습니다. 그래서이 문제를 극복하는 방법을 알려주세요. 벨로 내 루트 레벨 Gradle을 파일입니다Symbol MyObjectBox를 해결할 수 없습니다

buildscript { 
ext { 
    _buildToolsVersion = '26.0.1' 
    _compileSdkVersion = 26 
    objectboxVersion = '1.1.0' 
} 
repositories { 
    jcenter() 
    mavenCentral() 
    maven { url "http://objectbox.net/beta-repo/" } 
} 
dependencies { 
    classpath 'com.android.tools.build:gradle:2.2.3' 
    classpath 'com.google.gms:google-services:3.1.0' 
    classpath "io.objectbox:objectbox-gradle-plugin:$objectboxVersion" 
} 
}allprojects { 
repositories { 
    jcenter() 
    mavenCentral() 
    maven { 
     url 'https://maven.fabric.io/public' 
    } 
    maven { url "http://objectbox.net/beta-repo/" 
} 
} 
task clean(type: Delete) { 
delete rootProject.buildDir 
} 

응용 Gradle을 파일

apply plugin: 'com.android.application' 
android { 
compileSdkVersion 25 
buildToolsVersion "25.0.0" 
defaultConfig { 
    applicationId "com.kingof.android" 
    minSdkVersion 16 
    targetSdkVersion 25 
    versionCode 3 
    versionName "1.001" 
    multiDexEnabled = true 
    testInstrumentationRunner 
    "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 
    'proguard-rules.pro' 
    } 
    } 
    lintOptions { 
     disable 'ValidFragment' 
    } 
    } 
    repositories{ 
     mavenCentral() 
     } 
    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:design:25.3.1' 
testCompile 'junit:junit:4.12' 
compile 'com.jakewharton:butterknife:8.8.1' 
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' 

compile 'com.google.firebase:firebase-auth:10.0.1' 
compile 'com.google.firebase:firebase-database:10.0.1' 
compile 'com.google.firebase:firebase-storage:10.0.1' 
compile 'com.firebaseui:firebase-ui:1.0.1' 
compile 'com.google.firebase:firebase-messaging:10.0.1' 
compile 'com.google.firebase:firebase-ads:10.0.1' 


compile 'com.patrickpissurno:ripple-effect:1.3.1' 
compile 'com.google.code.gson:gson:2.7' 
compile 'com.github.bumptech.glide:glide:3.7.0' 
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.7' 
compile 'org.greenrobot:eventbus:3.0.0' 
compile 'com.snatik:storage:2.1.0' 
compile 'jp.wasabeef:glide-transformations:2.0.1' 
compile 'com.facebook.android:facebook-android-sdk:[4,5)' 
compile "io.objectbox:objectbox-android:$objectboxVersion" 


}apply plugin: 'com.google.gms.google-services' 
    apply plugin: 'io.objectbox' 
+0

앱의 Gradle 파일을 공유 할 수 있습니까? –

+0

@MarkusJunginger 앱의 Gradle 파일이 추가되었습니다. –

답변

2

MyObjectBox 아래 클래스를 빌드하는 동안 생성되고 난 당신이 와 적어도 하나 개의 모델 파일을 가질 필요가 있다고 생각입니다 @ 엔티티 주석이 생성됩니다.

+0

흥미 롭습니다 ... 오류가있는 모든 행을 수정하기 전에 빌드를 시도한 적이 처음이지만 오류가 * 빌드 후에 사라집니다. – Michael

관련 문제