build successful ,but can't running
See original GitHub issueC:\Users\pdog18\Desktop\android-architecture-components-master\BasicSample\app\src\main\java\com\example\android\persistence\db\AppDatabase.java
Error:(31, 17) 警告: Schema export directory is not provided to the annotation processor so we cannot export the schema. You can either provide `room.schemaLocation` annotation processor argument OR set exportSchema to false.
AppDatabase
/*
* Copyright 2017, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.example.android.persistence.db;
import android.arch.persistence.room.Database;
import android.arch.persistence.room.RoomDatabase;
import android.arch.persistence.room.TypeConverters;
import com.example.android.persistence.db.dao.CommentDao;
import com.example.android.persistence.db.dao.ProductDao;
import com.example.android.persistence.db.entity.CommentEntity;
import com.example.android.persistence.db.entity.ProductEntity;
import com.example.android.persistence.db.converter.DateConverter;
@Database(entities = {ProductEntity.class, CommentEntity.class}, version = 1)
@TypeConverters(DateConverter.class)
public abstract class AppDatabase extends RoomDatabase {
static final String DATABASE_NAME = "basic-sample-db";
public abstract ProductDao productDao();
public abstract CommentDao commentDao();
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:20 (2 by maintainers)
Top Results From Across the Web
android project build successful,but can not run at virtual device
when i build my android project use Android Studio, it shows BUILD SUCCESSFUL, But when i run at my virtual Device , it...
Read more >react-native run-android shows BUILD SUCCESSFUL but ...
I am opening my AVD and running the command react-native run-android , it seems to go right but exits the process and my...
Read more >Why does Android Studio build successfully but doesn't run ...
Android studio is a very big software and consumes a large amount of your RAM. When you are working on AS(android studio) you...
Read more >Fix error build successful but no output window - YouTube
Fixed error build successful but no out shown.How to fix the error program is successfully build but cant see the out...
Read more >Android build successful but will not deploy on phone
I'm having a problem with the Build and Run functionality. I am able to successfully build an apk. When the entire process completes, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try to export the schema by adding this to your
app/build.gradle
This helped me: https://movieos.org/2017/android-room-data-binding-compile-time-errors/
I was seeing a max of 100 databinding errors, with no “real” error message. By expanding the number of messages that can be shown, check the last error and it will be a real Room compilation error! So, hopefully you can fix that error and get compilation working again 😃