I'm seeing the following errors when I try to build an android lollipop ROM with a dummy app called "ClubInternetLives".
target Dex: SoundRecorder target Dex: CaptivePortalLogin target Dex: CertInstaller target Java: ClubInternetLives (out/target/common/obj/APPS/ClubInternetLives_intermediates/classes) target Dex: DownloadProviderUi target Dex: HTMLViewer packages/apps/ClubInternetLives/app/src/androidTest/java/clubinternetlives/androidstudio/com/clubinternetlives/ApplicationTest.java:4: error: cannot find symbol import android.test.ApplicationTestCase; ^ symbol: class ApplicationTestCase location: package android.test packages/apps/ClubInternetLives/app/src/androidTest/java/clubinternetlives/androidstudio/com/clubinternetlives/ApplicationTest.java:9: error: cannot find symbol public class ApplicationTest extends ApplicationTestCase { ^ symbol: class ApplicationTestCase packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:4: error: package android.support.design.widget does not exist import android.support.design.widget.FloatingActionButton; ^ packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:5: error: package android.support.design.widget does not exist import android.support.design.widget.Snackbar; ^ packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:6: error: package android.support.v7.app does not exist import android.support.v7.app.AppCompatActivity; ^ packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:7: error: package android.support.v7.widget does not exist import android.support.v7.widget.Toolbar; ^ packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:12: error: cannot find symbol public class MainActivity extends AppCompatActivity { ^ symbol: class AppCompatActivity packages/apps/ClubInternetLives/app/src/test/java/clubinternetlives/androidstudio/com/clubinternetlives/ExampleUnitTest.java:3: error: package org.junit does not exist import org.junit.Test; ^ packages/apps/ClubInternetLives/app/src/test/java/clubinternetlives/androidstudio/com/clubinternetlives/ExampleUnitTest.java:5: error: package org.junit does not exist import static org.junit.Assert.*; ^ packages/apps/ClubInternetLives/app/src/test/java/clubinternetlives/androidstudio/com/clubinternetlives/ExampleUnitTest.java:11: error: cannot find symbol @Test ^ symbol: class Test location: class ExampleUnitTest target Dex: KeyChain packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:16: error: cannot find symbol super.onCreate(savedInstanceState); ^ symbol: variable super location: class MainActivity packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:17: error: cannot find symbol setContentView(R.layout.activity_main); ^ symbol: method setContentView(int) location: class MainActivity packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:18: error: cannot find symbol Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); ^ symbol: class Toolbar location: class MainActivity packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:18: error: cannot find symbol Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); ^ symbol: class Toolbar location: class MainActivity packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:18: error: cannot find symbol Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); ^ symbol: method findViewById(int) location: class MainActivity packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:21: error: cannot find symbol FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); ^ symbol: class FloatingActionButton location: class MainActivity packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:21: error: cannot find symbol FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); ^ symbol: class FloatingActionButton location: class MainActivity packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:21: error: cannot find symbol FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); ^ symbol: method findViewById(int) location: class MainActivity Proguard: out/target/common/obj/APPS/LiveWallpapers_intermediates/proguard.classes.jar packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:25: error: cannot find symbol Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) ^ symbol: variable Snackbar packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:25: error: cannot find symbol Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) ^ symbol: variable Snackbar packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:14: error: method does not override or implement a method from a supertype @Override ^ packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:34: error: cannot find symbol getMenuInflater().inflate(R.menu.menu_main, menu); ^ symbol: method getMenuInflater() location: class MainActivity packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:31: error: method does not override or implement a method from a supertype @Override ^ packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:50: error: cannot find symbol return super.onOptionsItemSelected(item); ^ symbol: variable super location: class MainActivity packages/apps/ClubInternetLives/app/src/main/java/clubinternetlives/androidstudio/com/clubinternetlives/MainActivity.java:38: error: method does not override or implement a method from a supertype @Override ^ packages/apps/ClubInternetLives/app/src/test/java/clubinternetlives/androidstudio/com/clubinternetlives/ExampleUnitTest.java:13: error: cannot find symbol assertEquals(4, 2 + 2); ^ symbol: method assertEquals(int,int) location: class ExampleUnitTest 26 errors make: *** [out/target/common/obj/APPS/ClubInternetLives_intermediates/classes-full-debug.jar] Error 41 make: *** Waiting for unfinished jobs.... ProGuard, version 4.10 Reading program jar [/Volumes/untitled/WORKING_DIRECTORY/out/target/common/obj/APPS/LiveWallpapers_intermediates/classes.jar] Reading library jar [/Volumes/untitled/WORKING_DIRECTORY/out/target/common/obj/JAVA_LIBRARIES/core-junit_intermediates/classes.jar] Reading library jar [/Volumes/untitled/WORKING_DIRECTORY/out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jar] Reading library jar [/Volumes/untitled/WORKING_DIRECTORY/out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jar] Reading library jar [/Volumes/untitled/WORKING_DIRECTORY/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar] Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Preparing output jar [/Volumes/untitled/WORKING_DIRECTORY/out/target/common/obj/APPS/LiveWallpapers_intermediates/proguard.classes.jar] Copying resources from program jar [/Volumes/untitled/WORKING_DIRECTORY/out/target/common/obj/APPS/LiveWallpapers_intermediates/classes.jar] #### make failed to build some targets (01:41 (mm:ss)) ####
The app compiles and runs on android studio without any errors and warnings. As far as the ROM setup is concerned, I have added the app name in core.mk file at build/target/product. I have also added an Android.mk file in the main folder of the app. Any idea what could be the reason for these errors?
I was getting this error because my app had the precompiled java code that was created by Android studio. These errors were gone after I deleted those precompiled files from the java folder. The ROM compiler has a different build environment than the Android Studio or Eclipse environment.