When I cloned Android's default alarm in Anroid Open Source Project # https://android.googlesource.com/platform/packages/apps/DeskClock/ and tried to run it on Android Studio I got the following error:
package com.android.datetimepicker.time does not exist
cannot find symbol class TimePickerDialog
cannot find symbol class RadialPickerLayout <anonymous
com.android.deskclock.alarms.TimePickerCompat$TimerPickerPreL$1> is
not abstract and does not override abstract method
processTimeSet(int,int) in OnTimeSetListener
Please help in any way. Thank you.
After a week of frustration, I was able to clone the default alarm app and get rid of the above DateTimePicker errors mentioned above by injecting the dependency to the gradle by:
compile 'com.github.citux:datetimepicker:0.2.0'
Thanks to the good people out there (https://github.com/CiTuX/datetimepicker) who have cloned and distributed as a gradle dependency of the framework used in Android Open Source Project # https://android.googlesource.com/platform/frameworks/opt/datetimepicker
Hope this will help some who works on cloned Android Open Source Project.
Neither of those classes exist in the Android SDK. There is a
TimePickerDialog, as others have noted, in a different package.
There is a RadialPickerLayout in the Android source code, and you
are welcome to try to use it.
Really, you should be talking to whoever wrote this Android project
and asking them where they were planning on getting those classes
from.
Here is the main answer
Related
Does anyone have any idea where to look for android.support.multidex.MultiDexApplication in Xamarin? I am unable to find it anywhere (tried all support libraries).
To this date (30.11.2015) it doesn't reside anywhere (Xamarin's bugzilla has this issue filled in).
Please review this link "https://developer.xamarin.com/guides/android/advanced_topics/binding-a-java-library/binding-an-aar/"
For Windows, the path of the aar file may be in C:\Program Files (x86)\Android\android-sdk\extras\android\m2repository\com\android\support (multidex & multidex-instrumentation)
In my case, to extend the MultiDexApplication class, using VisualStudio 2015 and Xamarin, I needed to create a new project in the solution, as explained in the link. Later, it had access available in the Android project.
I want to use RoboSpock for Testing my android apps, but I am stuck setting up my project. I created an example project which I have added to github.
https://github.com/DerSchimi/RoboSpockExample
This project contains a folder called AppLibrary which is an android-library. The App itself is inside the folder App.
All RoboSpock Tests should go inside the folder AppTests. I have configured everything, but when I try to run my tests I get this error message:
WARNING: no system properties value for ro.build.date.utc
groovy.lang.MissingPropertyException: No such property: AppActivity for class: de.derschimi.app.MainActivitySpecification
at de.derschimi.app.MainActivitySpecification.Should say hello world(MainActivitySpecification.groovy:15)
This is the line of code:
def mainActivity = Robolectric.buildActivity(AppActivity.class).create().get()
Is there anybody out there who is using RoboSpock? Thanks a lot for your help!
The plugin I consider as deprecated. At this moment I'm creating just samples how to enforce gradle java plugin understand the android one. I suggest to browse this project.
https://github.com/pjakubczyk/robospock-sample/tree/master/simple
I know that there are some similar questions, but no solution helped me.
I am getting a java.lang.NoClassDefFoundError when I try to access an (existing) class
in a self-created .jar from my projectgroup.
This .jar works fine in an normal javaProject but doesn´t work with Android.
But an older version of this .jar worked fine with Android.
I am developing with Eclipse + Android Development Tool - Plugin (Version 21)
I have put the .jar in the Project_Home/libs folder.
There are no errors at compiletime.
Before the exception was thrown, there was some "dalvikvm - could not find class ... referenced from ..." errors.
I think, there could be a problem with the Java Version, because our projectgroup recently started to use Java 7, but I am not sure and have no idea how to fix it.
Thanks a lot for your help.
Rename your lib to libs and update the build path and then try again
I think if the project is compiling fine then we can rule out any error in copying or java buildpath. The only other time i get this error is when my import is wrong in the code. I would suggest you to re-check your import and recreate R.java file.
Make sure that your classes do not have same names as ones already present within Android. Upon building the package, due to "optimization" classes with same names are omitted.
Android libraries are mostly compiled against 1.5. Not all libraries are also present within Android. Your package may depend on some other library that is not present within the system.
Ordinarily I don't want to answer my own question but I hope it will help someone.
I didn't see an other warning (not in Logcat, it was in the console):
"Dx bad class file magic (cafebabe) or version (0033.0000)"
I had found this Warning in an other Stackoverflow question.
I had opened one of the class file from the not working .jar with an HexEditor
and changed the Major-Version-Byte to 0x32 and it worked.
I know this is not a solution, because there could be features from Java 7 in the class,
so the class file no longer work, but it proves that it was a problem with the Java version
I planned to test the OpenGL framework Rajawali.
When I follow the tutorial on how to set it up I do the following:
Create an Android project.
Import the Rajawali source code. As soon as that is done I get the error:
"The method setOffsetNotificationsEnabled(boolean) is undefined for the type WallpaperService.Engine Wallpaper.java /Rajawali-master/src/rajawali/wallpaper line 312".
and
"The method setOffsetNotificationsEnabled(boolean) of type Wallpaper.WallpaperEngine must override or implement a supertype method Wallpaper.java /Rajawali-master/src/rajawali/wallpaper line 310".
When I try to link the Rajawali project with the project I created I get errors:
The container 'Android Dependencies' references non existing library "D:\Prosjekter\Rajawij\Rajawali-master\bin\rajawali-master.jar".
and
"The project cannot be built until build path errors are resolved". <--- Should go away as soon as the other errors are fixed I guess.
Anyone have experience with Rajawali or have an idea on how I get solve the problems?
Thanks for any help!
I've been using Rajawali extensively for a few months. I would ensure you have all Google APIs installed up to 4.2+ Also be sure to grab the most current Master branch from their github. The links on the tutorial pages are out of date. https://github.com/MasDennis/Rajawali
They moved away from using a compiled JAR and instead are encouraging linking it as a library to your project. When you do that be sure to clean all projects and make sure that you don't have any files or folders in your project that are duplicates of those in Rajawalis libs folder.
Good luck, its a fantastic framework.
I have created the three projects as described in http://code.google.com/p/libgdx/wiki/ProjectSetup, and running the desktop version works, but I am getting the error below when I run the android version on the emulator. The main project is in the build path of the android project and eclipse builds everything with no errors. what am I missing?
10-31 07:06:47.023: E/dalvikvm(769): Could not find class 'com.mygame.MyGame',
referenced from method com.mygame.MyGameAndroid.onCreate
I have resolved this when I switched the Java compiler for the main project from JavaSE-1.7 to JavaSE-1.6. Do now know why this did not work with JavaSE-1.7. Would appreciate any comments on that.
EDIT: a related post: http://www.badlogicgames.com/forum/viewtopic.php?f=11&t=2314
In my case, this happened because my core Game class derived from a framework Game class. The framework class wasn't properly included; since the subclass couldn't be found, Android reported that the main class couldn't be found (since it wasn't fully known).
To solve this, I correctly added my derived framework reference, and everything worked.
In had to check the radio button in the android project properties->Java Build Path-> Order and Export-> main game project. Hope it helps anyone else.