I am running a downloaded tested code from an Android app development course by Rob Percival in Android studio.
The code is for fetching HTML content of a specified URL and displaying it in the logs.
It's the tested code provided by the author of the course.
The code runs fine but only a part of the HTML content of the specified URL is displayed in the logs.
These are the additional log entries I'm getting:
(After displaying partial html content)
I/art: Background sticky concurrent mark sweep GC freed 81(3KB) AllocSpace objects, 43(11MB) LOS objects, 37% free, 6MB/10MB, paused 1.012ms total 115.686ms
D/: HostConnection::get() New Host Connection established 0xa63c98c0, tid 10451
D/: HostConnection::get() New Host Connection established 0xa63c9d80, tid 10487
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 1
W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
D/OpenGLRenderer: Swap behavior 0
D/EGL_emulation: eglCreateContext: 0xa83cdf20: maj 2 min 0 rcv 2
D/EGL_emulation: eglMakeCurrent: 0xa83cdf20: ver 2 0 (tinfo 0xa84e32d0)
D/EGL_emulation: eglMakeCurrent: 0xa83cdf20: ver 2 0 (tinfo 0xa84e32d0)
Any help would be appreciated.
Thanks.
Related
The application is very laggy and the more things are being clicked, the more it lags. At some point it completely freezes. This is my error log. How can i optimize it? (Full beginner)
NativeAlloc concurrent copying GC freed 8231(560KB) AllocSpace objects, 1(20KB) LOS objects, 49% free, 5936KB/11MB, paused 44.140ms total 1.790s
I/Choreographer: Skipped 30 frames! The application may be doing too much work on its main thread.
I/OpenGLRenderer: Davey! duration=820ms; Flags=0, IntendedVsync=12357482298756, Vsync=12357982298736, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=12358003456500, AnimationStart=12358003547700, PerformTraversalsStart=12358005401700, DrawStart=12358023891800, SyncQueued=12358058644400, SyncStart=12358063300300, IssueDrawCommandsStart=12358065361800, SwapBuffers=12358274912900, FrameCompleted=12358307408500, DequeueBufferDuration=3954100, QueueBufferDuration=21280700, GpuCompleted=0,
I/ample.indistan: Thread[5,tid=11901,WaitingInMainSignalCatcherLoop,Thread*=0xdf380010,peer=0x13600268,"Signal Catcher"]: reacting to signal 3
I/ample.indistan: Mutator lock exclusive owner tid: 18446744073709551615
ThreadList lock owner tid: 11919
ClassLinker classes lock owner tid: 0
ClassLinker dex lock owner tid: 0
I/ample.indistan: Waiting for a blocking GC ObjectsAllocated
I/ample.indistan: NativeAlloc concurrent copying GC freed 4035(425KB) AllocSpace objects, 3(60KB) LOS objects, 49% free, 5972KB/11MB, paused 2.528ms total 289.491ms
I/ample.indistan: WaitForGcToComplete blocked ObjectsAllocated on ProfileSaver for 5.863ms
I/ample.indistan: Wrote stack traces to tombstoned
I/Choreographer: Skipped 205 frames! The application may be doing too much work on its main thread.
W/ample.indistan: Verification of boolean androidx.core.view.KeyEventDispatcher.actionBarOnMenuKeyEventPre28(android.app.ActionBar, android.view.KeyEvent) took 105.167ms (494.45 bytecodes/s) (1768B approximate peak alloc)
W/ample.indistan: Verification of boolean androidx.core.view.KeyEventDispatcher.activitySuperDispatchKeyEventPre28(android.app.Activity, android.view.KeyEvent) took 126.372ms (538.09 bytecodes/s) (1728B approximate peak alloc)
V/FA: Recording user engagement, ms: 63317
I/Choreographer: Skipped 322 frames! The application may be doing too much work on its main thread.
V/FA: Connecting to remote service
V/FA: onActivityCreated
V/FA: Connection attempt already in progress
V/FA: Activity paused, time: 12386204
V/FA: Activity resumed, time: 12391211
V/FA: Connection attempt already in progress
V/FA: Connection attempt already in progress
I/Choreographer: Skipped 267 frames! The application may be doing too much work on its main thread.
W/RecyclerView: No adapter attached; skipping layout
I/OpenGLRenderer: Davey! duration=5309ms; Flags=1, IntendedVsync=12387232708368, Vsync=12391682708190, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=12391699342600, AnimationStart=12391699362500, PerformTraversalsStart=12391709661200, DrawStart=12392393938500, SyncQueued=12392471934000, SyncStart=12392475519700, IssueDrawCommandsStart=12392475611700, SwapBuffers=12392518233700, FrameCompleted=12392545949800, DequeueBufferDuration=1156600, QueueBufferDuration=14934400, GpuCompleted=8223625903103697763,
I/OpenGLRenderer: Davey! duration=5411ms; Flags=1, IntendedVsync=12387232708368, Vsync=12391682708190, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=12391699342600, AnimationStart=12391699362500, PerformTraversalsStart=12391709661200, DrawStart=12392632905600, SyncQueued=12392639112300, SyncStart=12392640203300, IssueDrawCommandsStart=12392641107800, SwapBuffers=12392643554700, FrameCompleted=12392645523900, DequeueBufferDuration=514100, QueueBufferDuration=1073700, GpuCompleted=185817465094143,
I/Choreographer: Skipped 154 frames! The application may be doing too much work on its main thread.
W/RecyclerView: No adapter attached; skipping layout
I/OpenGLRenderer: Davey! duration=2957ms; Flags=0, IntendedVsync=12391732774600, Vsync=12394299441164, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=12394309810900, AnimationStart=12394309826300, PerformTraversalsStart=12394327757600, DrawStart=12394468721300, SyncQueued=12394483804300, SyncStart=12394518606400, IssueDrawCommandsStart=12394523119100, SwapBuffers=12394667312700, FrameCompleted=12394725342600, DequeueBufferDuration=6457800, QueueBufferDuration=19058700, GpuCompleted=2314885530818453536,
I/Choreographer: Skipped 122 frames! The application may be doing too much work on its main thread.
I would like to play a video using VideoView:
videoView.setVideoURI(Uri.parse("http://192.168.1.10:7777/mov_bbb.mp4"));
videoView.start();
It works randomly. 20% of the time the video is loaded, and it starts. But 80% of the time, I get this error:
Can't play this video
This is outputted to the console:
W/MediaPlayer: Couldn't open http://192.168.1.10:7777/...
java.io.FileNotFoundException: No content provider: http://192.168.1.10:7777/mov_bbb.mp4
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1673)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1503)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1420)
at android.media.MediaPlayer.attemptDataSource(MediaPlayer.java:1101)
at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1073)
at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1097)
at android.widget.VideoView.openVideo(VideoView.java:412)
at android.widget.VideoView.access$2200(VideoView.java:83)
at android.widget.VideoView$7.surfaceCreated(VideoView.java:694)
at android.view.SurfaceView.updateSurface(SurfaceView.java:758)
at android.view.SurfaceView$2.onPreDraw(SurfaceView.java:155)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1088)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2745)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1721)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7598)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:966)
at android.view.Choreographer.doCallbacks(Choreographer.java:790)
at android.view.Choreographer.doFrame(Choreographer.java:725)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:951)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
V/MediaHTTPService: MediaHTTPService(android.media.MediaHTTPService#969a5ef): Cookies: null
D/EGL_emulation: eglMakeCurrent: 0xe331a180: ver 3 0 (tinfo 0xe330f830)
V/MediaHTTPService: makeHTTPConnection: CookieHandler (java.net.CookieManager#abffe09) exists.
V/MediaHTTPService: makeHTTPConnection(android.media.MediaHTTPService#969a5ef): cookieHandler: java.net.CookieManager#abffe09 Cookies: null
D/EGL_emulation: eglMakeCurrent: 0xe331a180: ver 3 0 (tinfo 0xe330f830)
D/EGL_emulation: eglMakeCurrent: 0xe331a180: ver 3 0 (tinfo 0xe330f830)
W/MediaHTTPConnection: readAt 516238 / 32768 => java.net.ProtocolException
E/MediaPlayerNative: error (1, -2147483648)
E/MediaPlayer: Error (1,-2147483648)
I have no idea how to debug this. Is it possible to catch these errors, disable the alert, and just silently retry?
If I open the url in a browser, the video loads and plays perfectly.
Try this
Uri uri= Uri.parse(Environment.getExternalStorageDirectory().getAbsolutePath()+"/yourvideopath");
videoView.setVideoURI(uri);
videoView.start();
You can get the path of your video stored in external storage by using this.
Replace "/yourvideopath" with your video path such as /dcim/camera/mov_bbb.mp4
I know that similar questions to this have been asked here before, but this is boggling my mind. I have researched this error and it seems to mostly pop up when you are referencing some part of an array outside its bounds or something, but this error ONLY occurs when I run the app on a virtual device with an API below 23. The machine it fails on is a Galaxy Nexus on API 22, however it also fails on a Nexus 4 with API 22. I tested it also on a virtual Nexus 4 with API 23 and it works, every API above this also works. I want my minimum SDK to be even lower but until I resolve this that will be impossible. Below is some code to help you geniuses see what's driving me insane.
(Cursor resultSet is set globally but it doesn't make a difference)
resultSet = mydatabase.rawQuery("SELECT * FROM words WHERE" + allowRepeats + " frequency >= 0 ORDER BY RANDOM() LIMIT 1",null); -THIS is the line that breaks no matter what I do.
This code renders to "SELECT * FROM words WHERE solved < 1 AND frequency >= 0 ORDER BY RANDOM() LIMIT 1" and this code works on EVERY API above 22, but when running on 22 I get the error "A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x2c in tid 27273 (ics.choicewords)"
Some notes on what I've tried:
I have made sure that the database does exist and like I said it works on other APIs
I have tried setting the cursor just to null and returning empty strings as the result instead of any data, this works fine but of course is not an option
The rawQuery is run inside a loop that cycles 4 times, but taking it out and just running that single line once still breaks with the same error
Error Log:
I/art: Rejecting re-init on previously-failed class java.lang.Class<Tz>
Rejecting re-init on previously-failed class java.lang.Class<Tz>
W/cr_media: Requires BLUETOOTH permission
E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
D/: HostConnection::get() New Host Connection established 0xae9b0880, tid 5080
E/chromium: [ERROR:gl_surface_egl.cc(411)] eglChooseConfig failed with error EGL_SUCCESS
D/EGL_emulation: eglCreateContext: 0xae9bf7c0: maj 2 min 0 rcv 2
I/Ads: This request is sent from a test device.
D/EGL_emulation: eglMakeCurrent: 0xae9bf7c0: ver 2 0 (tinfo 0xae839eb0)
E/chromium: [ERROR:gl_surface_egl.cc(411)] eglChooseConfig failed with error EGL_SUCCESS
I/DynamiteModule: Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:21001
Selected remote version of com.google.android.gms.ads.dynamite, version >= 21001
V/DynamiteModule: Dynamite loader version >= 2, using loadModule2NoCrashUtils
I/art: Background partial concurrent mark sweep GC freed 2186(176KB) AllocSpace objects, 1(12KB) LOS objects, 33% free, 7MB/11MB, paused 9.052ms total 67.508ms
W/Ads: Invoke Firebase method getInstance error.
The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date
I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
W/cr_MediaCodecUtil: HW encoder for video/avc is not available on this device.
D/EGL_emulation: eglCreateContext: 0xaea6c640: maj 2 min 0 rcv 2
D/EGL_emulation: eglMakeCurrent: 0xaea6c640: ver 2 0 (tinfo 0xae839eb0)
A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x2c in tid 4979 (ics.choicewords)```
I fixed this error a long time ago, so I'm not entirely sure how, but looking back at my old code, it appears the error was created when there were no results that matched the query. I accounted for this afterwards by checking the resultSet count, if it was < 1, I replaced the resultSet with a set of arbitrary values that my app would understand meant no-results. This resolved the issue!
I have a mapsActivity that don't load correctly. The Api key is well
configured because if I call to maps activity after the splashScreen everything works OK. My emulator has installed api 26
This is the log when I call Mapsactivity after splashScreen.
> I/FA: App measurement initialized, version: 22048
> I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
> I/FA: To enable faster debug mode event logging run:
> adb shell setprop debug.firebase.analytics.app com.lyntia.android.mera
> D/FA: Debug-level message logging enabled
> D/SplashScreenActivity: User has logged in, token OK
> V/FA: onActivityCreated
> I/zygote: Background concurrent copying GC freed 15298(1332KB) AllocSpace objects, 11(220KB) LOS >objects, 55% free, 1238KB/2MB,
> paused 2.344ms total 101.117ms
> V/FA: Connecting to remote service
> V/FA: Connection attempt already in progress
> I/zzbz: Making Creator dynamically
> W/zygote: Skipping duplicate class check due to unrecognized classloader
> I/DynamiteModule: Considering local module com.google.android.gms.maps_dynamite:0 and remote module
> com.google.android.gms.maps_dynamite:221
> Selected remote version of com.google.android.gms.maps_dynamite, version >= 221
> V/DynamiteModule: Dynamite loader version >= 2, using loadModule2NoCrashUtils
> V/FA: Connection attempt already in progress
> W/zygote: Skipping duplicate class check due to unrecognized classloader
> I/zygote: Do partial code cache collection, code=30KB, data=22KB
> After code cache collection, code=30KB, data=22KB
> I/zygote: Increasing code cache capacity to 128KB
> I/Google Maps Android API: Google Play services client version: 12451000
> I/Google Maps Android API: Google Play services package version: 16089022
> I/zygote: Do partial code cache collection, code=52KB, data=38KB
> I/zygote: After code cache collection, code=52KB, data=38KB
> Increasing code cache capacity to 256KB
> D/skia: --- SkAndroidCodec::NewFromStream returned null
> V/FA: Activity resumed, time: 3535145
> I/FA: Tag Manager is not found and thus will not be used
> D/OpenGLRenderer: HWUI GL Pipeline
> I/zygote: Do full code cache collection, code=83KB, data=87KB
> D/: HostConnection::get() New Host Connection established 0xa3a7c440, tid 15830
> I/OpenGLRenderer: Initialized EGL, version 1.4
> D/OpenGLRenderer: Swap behavior 1
> I/zygote: After code cache collection, code=81KB, data=65KB
> W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
> D/OpenGLRenderer: Swap behavior 0
> D/EGL_emulation: eglCreateContext: 0xa63060a0: maj 2 min 0 rcv 2
> V/FA: Connection attempt already in progress
> V/FA: Connection attempt already in progress
> D/EGL_emulation: eglMakeCurrent: 0xa63060a0: ver 2 0 (tinfo 0x88213db0)
> E/RecyclerView: No adapter attached; skipping layout
> D/: HostConnection::get() New Host Connection established 0x932f0040, tid 15826
> D/EGL_emulation: eglCreateContext: 0xa6305920: maj 1 min 0 rcv 1
> D/EGL_emulation: eglMakeCurrent: 0xa63060a0: ver 2 0 (tinfo 0x88213db0)
> D/EGL_emulation: eglMakeCurrent: 0xa6305920: ver 1 0 (tinfo 0x92ef6900)
> D/FA: Connected to remote service
> V/FA: Processing queued up service tasks: 5
> I/zygote: Do partial code cache collection, code=111KB, data=97KB
> I/zygote: After code cache collection, code=102KB, data=92KB
> I/zygote: Increasing code cache capacity to 512KB
> W/DynamiteModule: Local module descriptor class for com.google.android.gms.googlecertificates not >found.
> I/DynamiteModule: Considering local module com.google.android.gms.googlecertificates:0 and remote >module
> com.google.android.gms.googlecertificates:4
> Selected remote version of com.google.android.gms.googlecertificates, version >= 4
> W/zygote: Skipping duplicate class check due to unrecognized classloader
> V/FA: Inactivity, disconnecting from the service
> I/zygote: Do full code cache collection, code=240KB, data=192KB
> After code cache collection, code=208KB, data=138KB
> I/zygote: Do partial code cache collection, code=245KB, data=187KB
> I/zygote: After code cache collection, code=245KB, data=187KB
> Increasing code cache capacity to 1024KB
This is the log when I call mapsActivity in they correct place (Don't work).
D/EGL_emulation: eglMakeCurrent: 0xa3de7c80: ver 2 0 (tinfo 0xa3918900)
D/EGL_emulation: eglMakeCurrent: 0xa3de7c80: ver 2 0 (tinfo 0xa3918900)
V/FA: Recording user engagement, ms: 1649
V/FA: Activity paused, time: 671631
V/FA: onActivityCreated
I/zygote: JIT allocated 56KB for compiled code of void android.view.View.<init>(android.content.Context, android.util.AttributeSet, int, int)
I/zzbz: Making Creator dynamically
W/zygote: Skipping duplicate class check due to unrecognized classloader
I/DynamiteModule: Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:221
Selected remote version of com.google.android.gms.maps_dynamite, version >= 221
V/DynamiteModule: Dynamite loader version >= 2, using loadModule2NoCrashUtils
W/zygote: Skipping duplicate class check due to unrecognized classloader
I/Google Maps Android API: Google Play services client version: 12451000
I/Google Maps Android API: Google Play services package version: 16089022
V/FA: Activity resumed, time: 672047
E/RecyclerView: No adapter attached; skipping layout
D/: HostConnection::get() New Host Connection established 0x9157a5c0, tid 7910
D/EGL_emulation: eglCreateContext: 0x911c7740: maj 1 min 0 rcv 1
D/EGL_emulation: eglMakeCurrent: 0xa3de7c80: ver 2 0 (tinfo 0xa3918900)
D/EGL_emulation: eglMakeCurrent: 0x911c7740: ver 1 0 (tinfo 0x90eec950)
D/EGL_emulation: eglMakeCurrent: 0xa3de7c80: ver 2 0 (tinfo 0xa3918900)
D/EGL_emulation: eglMakeCurrent: 0xa3de7c80: ver 2 0 (tinfo 0xa3918900)
W/DynamiteModule: Local module descriptor class for com.google.android.gms.googlecertificates not found.
I/DynamiteModule: Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:4
Selected remote version of com.google.android.gms.googlecertificates, version >= 4
W/zygote: Skipping duplicate class check due to unrecognized classloader
I/zygote: Do full code cache collection, code=471KB, data=305KB
After code cache collection, code=467KB, data=235KB
V/FA: Inactivity, disconnecting from the service
I/zygote: Do partial code cache collection, code=495KB, data=276KB
I/zygote: After code cache collection, code=495KB, data=276KB
Increasing code cache capacity to 2MB
activity_maps.xml
<fragment
android:id="#+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3" />
MapsActivity.java
import androidx.fragment.app.FragmentActivity;
import android.os.Bundle;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;
public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {
private GoogleMap mMap;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
/**
* Manipulates the map once available.
* This callback is triggered when the map is ready to be used.
* This is where we can add markers or lines, add listeners or move the camera. In this case,
* we just add a marker near Sydney, Australia.
* If Google Play services is not installed on the device, the user will be prompted to install
* it inside the SupportMapFragment. This method will only be triggered once the user has
* installed Google Play services and returned to the app.
*/
#Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
// Add a marker in Sydney and move the camera
LatLng sydney = new LatLng(-34, 151);
mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));
}
}
androidManifest.xml
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".MeraApp"
android:allowBackup="true"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:usesCleartextTraffic="true">
<!--
The API key for Google Maps-based APIs is defined as a string resource.
(See the file "res/values/google_maps_api.xml").
Note that the API key is linked to the encryption key used to sign the APK.
You need a different API key for each encryption key, including the release key that is used to
sign the APK for publishing.
You can define the keys for the debug and release targets in src/debug/ and src/release/.
-->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
Before mapsactivity there are some activities that get and post data from/to the server.
I don't know if it can be a problem with memory, cache...
Any help?
Trying to tweak the app by launching the DetectorActivity(main activity that does the detection) only when a button is clicked.
So within the source code, I've added a class "Main Activity", set it as the launching activity in the manifest, and in it's xml, added a button that when clicked, should send an intent to the DetectorActivity and launch it. The code is pretty much this :
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void on(View v){
Intent i = new Intent(this,DetectorActivity.class);
startActivity(i);
}
However, the activity is never launched, which is quite baffling.
Here is the logcat of the emulator:
I/art: Ignoring second debugger -- accepting and dropping
12-21 20:39:13.111 23543-23550/.abc I/art: Ignoring second debugger -- accepting and dropping
12-21 20:39:13.563 23543-23543/.abc W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
12-21 20:39:13.745 23543-23554/abc I/art: Background sticky concurrent mark sweep GC freed 9521(535KB) AllocSpace objects, 0(0B) LOS objects, 75% free, 950KB/3MB, paused 8.576ms total 187.364ms
12-21 20:39:14.110 23543-23543/abc I/art: Rejecting re-init on previously-failed class java.lang.Class<android.support.v4.view.ViewCompat$OnUnhandledKeyEventListenerWrapper>
12-21 20:39:14.112 23543-23543/.abc I/art: Rejecting re-init on previously-failed class java.lang.Class<android.support.v4.view.ViewCompat$OnUnhandledKeyEventListenerWrapper>
12-21 20:39:15.082 23543-23577/abc D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
12-21 20:39:15.338 23543-23577/.abc I/OpenGLRenderer: Initialized EGL, version 1.4
12-21 20:39:15.338 23543-23577/abc W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
12-21 20:39:15.387 23543-23577/abc D/EGL_emulation: eglCreateContext: 0x7f758dd74f40: maj 2 min 0 rcv 2
12-21 20:39:15.403 23543-23577/abc D/EGL_emulation: eglMakeCurrent: 0x7f758dd74f40: ver 2 0 (tinfo 0x7f758dd532a0)
12-21 20:39:15.777 23543-23577/abc D/EGL_emulation: eglMakeCurrent: 0x7f758dd74f40: ver 2 0 (tinfo 0x7f758dd532a0)
12-21 20:39:16.102 23543-23543/abc I/Choreographer: Skipped 56 frames! The application may be doing too much work on its main thread.
12-21 20:57:47.896 23543-23550/abc I/art: Ignoring second debugger -- accepting and dropping
12-21 20:57:47.909 23543-23550/abc I/art: Ignoring second debugger -- accepting and dropping
12-21 21:00:48.853 23543-23550/abc I/art: Ignoring second debugger -- accepting and dropping
Any help in this matter would be truly appreciated!
How are you setting the click listener? This log suggests it's not being called.
The comment by #RyanMentley solved it, thanks a bunch.