• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Gradle DSL method not found: 'testImplementation()' when creating a separate test module

I do according to this instruction:https://developer.android.com/studio/test#use_separate_test_modules_for_instrumented_tests
After I replaced apply plugin: 'com.android.library' with apply plugin: 'com.android.test' I got this error:
Code:
ERROR: Gradle DSL method not found: 'testImplementation()'
Possible causes:
The project 'app5' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0).
Upgrade plugin to version 3.4.2 and sync project

The project 'app5' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper file

The build file may be missing a Gradle plugin.
Apply Gradle plugin
No actions that the studio offers naturally work. What to do?

Help How to stop update notifications

Hello everybody. I have a Lenovo k8 plus. It is almost a perfect phone except for one thing: it constantly keeps on showing me update notifications about 50-60 times a day full screen. It draws over other apps and many times interrupts and causes problems with other apps that were running...

It is very annoying and I have no idea how to disable these full screen notifications. Any help?

Rooting

OK guys I know it must be possible to root a Samsung Tab A (2019), but can find no useful info but searching, most that I find relates to earlier models running earlier versions of Android - my tab is on 9.0. Any advice on where to find a decent guide would be most appreciated.....

Apps What is a problem in your life that a mobile app would solve?

Hey there!

I'm a university student at Queensland University of Technology (QUT). My degree is in Information Technology (Computer Science), and one of the firsts assignments I'll be doing is developing the front-end of a mobile application with my group.

Part of the assignment is to find problem spaces for our mobile application by asking members of the public, so here I am!

If anyone is interested, I'll happily share the progress of the mobile app that my team and I work on once we decide on a problem space to tackle, and I'd also open the testing of the front-end to anyone willing to follow the required conditions of the testing!

I look forward to reading your responses.

Move to SD Card Greyed Out

Hello Android Community,

Manufacturer: Alcatel
Model: A571VL
Software: 5.1.1
Not rooted

I recently purchased a new Alcatel phone, which is the exact same model as my old one. On my old one I could move any app to SD card except ones that were bundled with the phone. With this new phone I cannot move ANY third-party apps because every single app shows "move to SD card" greyed out.

What I've tried: removing SD card and then restarting phone, then inserting SD card again. I still get "move to SD card" greyed out. I tried going into developer territory and that was a mistake: tap build number 5-10 times and get force allow apps on external storage. Didn't find it. Anyway, I know nothing about rooting my phone and that seems too deep for my technical skills, but it has been suggested during my research.

Can the community offer some guidance? It's not about some app developers not wanting you to fiddle with their widgets. This is about every single third-party app I've downloaded not able to be moved to the SD card. One final thought: I'm using the SD card from my old phone. Could it be that I need to get a new SD card for this phone?

Thanks for all thoughts and prayers as this non-nerdy Alcatel user struggles to overcome this challenge. A few Novenas would be even better (that's for all you Catholics out there, who may attend morning mass and offer up a prayer for my sanity to be kept intact) ; )

Freeform on Android

Currently I'm impressed by this feature. I'd like to know:

1) Had Samsung's high-end devices adopted this feature before Google supported it in the Developer Options?

2) Is Samsung the only manufacturer who's implementing this?

2) If I wished to test Launcher3-freeform apk, could I do it via Android Studio's emulator - i.e. letting the app run on this environment?

(Incidentally, I'm approaching right now the Android development world, hence items like Android Studio and so on)

Best regards.

Help Steps to transfer all data from old phone to new phone without losing any data?

I am a bit paranoid transferring from old android phone (samsung galaxy S4) to new android phone (samsung note 8) that I will lose data/history/messages after I have removed the sim card from the old phone and put it into the new phone.

I want everything in my old phone to appear in my new phone. I am a noob, the last time I did a transfer process was 5 years ago (samsung galaxy S4).

Is there anything I should be aware of? (I do not want any data to be accidentally disappear/deleted.)

What are the apps that once you login in the new phone, the old messages/history will automatically appear?

I think contact list will automatically appear once I login to google account. I think I would need to backup sms messages, whatsapp messages and restore them in the new phone.

If you have any bad experiences, data loss, while transferring from old phone to a new phone, do share your experience.

Thanks.

switching to Verizon, is that a mistake?

hey guys,
so i'm starting to think that i made a mistake switching to Verizon. maybe not a mistake......i don't know maybe it is just buyer's remorse or something like that.

so i have been on Sprint pretty much from day 1 with android. the main reason i'm having doubts is this potential merger with T-mobile. the prices are about the same which is the reason why i switched. would the merger cause the price plans to go up or down? how much better would their coverage be? these are all unknowns to me.

i'm not sure i like the fact the Verizon throttles their data and streaming services. i do not how customer support is with Verizon. nor do i know much about their coverage. one of the guys at Best Buy said that sometimes at public places like a stadium and such data speeds can be slowed down due to the large number of people who use their cellphone. he said it can slowed down to 3g speeds. this makes me nervous.

did i make a mistake?

Help Cerberus Anti-Theft flagged in Google Play ...

I received a notification from the Google Play Store several minutes ago stating some problem with the Cerberus Anti-Theft app, and removal was offered. Is this a legitimate notification or has the app been cracked somehow?

I could login to my Cerberus account at https://www.cerberusapp.com/dashboard via the web, but it was unable to communicate with the Nexus 6P device for the first time ever.

Your thoughts, please? Thank you.

Flutter connection issues to ASP.Net API

Hi all, I have been trying to get a few things working on a project I am look at currently, but as a beginner this isn't working out too well.

I have a database set up on a sqlexpress server, a single database with a single table with 4 fields.

ID: primary key, autoincrementing, INT
JobRef: nvarchar(10)
ScanDate: datetime
Dept: nvarchar(20)

Now, the api I have is running, I can get the values, I can post into the table. but when I try to connect the flutter app I keep getting an error:

Now for the life in me I cannot see where the issue is but if you could aim me in the right direction I would be most grateful.

[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: type 'String' is not a subtype of type 'int' of 'index'

My research says there's an issue with something been seen as a string and not an int, or the other way round but I don't know enough about the code below to figure it out and i'm following tutorials no end to get this working...

FIXED THIS BIT: I have also noticed that when using chrome to browse, the output seems to come in the form of xml even though I would reaaaally like this in json so other things can be done with it. Again, my lack of knowledge and experience means I'm not sure where to look to find the answer...

Code:
import 'package:flutter/material.dart';
import 'dart:async';
import 'dart:convert';
import 'package:http/http.dart' as http;

//  This one works perfectly fine outputting to the console ------
//  String _apiUrl =
//    'https://newsapi.org/v2/everything?q=bitcoin&from=2019-07-13&sortBy=publishedAt&apiKey=44c492d13e1e4727987774a82beea8de';

//  This one doesn't -- website hidden for privacy
String _apiUrl = 'http://hidmywebpage:port/api/BarcodeScans';

List _provider1;

void main() async {
  _provider1 = await fetchData(_apiUrl);

  // outputs to the console log
  for (int i = 0; i < _provider1.length; i++) {
    print(_provider1['ID']); // --> 'title' or 'description'
  }

  runApp(new MaterialApp(
    home: new Categories(),
  ));
}

class Categories extends StatelessWidget {
  [USER=1021285]@override[/USER]
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text("News"),
        centerTitle: true,
      ),
      body: new Center(
        child: new Column(
          mainAxisAlignment: MainAxisAlignment.spaceEvenly,
          children: <Widget>[
            new RaisedButton(
                padding: const EdgeInsets.all(12.0),
                color: Colors.red,
                onPressed: null,
                child: new Text("Get Headlines",
                    style: new TextStyle(
                      fontSize: 21.0,
                      color: Colors.white,
                    )))
          ],
        ),
      ),
    );
  }
}

Future<List> fetchData(String apiUrl) async {
  http.Response response = await http.get(apiUrl);
  return (json.decode(response.body))['ID'];
}

error log:

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk...
Syncing files to device Android SDK built for x86...
E/flutter (17345): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: SocketException: OS Error: Connection refused, errno = 111, address = ***, port = 41535
E/flutter (17345): #0 IOClient.send (package:http/src/io_client.dart:33:23)
E/flutter (17345): <asynchronous suspension>
E/flutter (17345): #1 BaseClient._sendUnstreamed (package:http/src/base_client.dart:169:38)
E/flutter (17345): <asynchronous suspension>
E/flutter (17345): #2 BaseClient.get (package:http/src/base_client.dart:32:7)
E/flutter (17345): #3 get.<anonymous closure> (package:http/http.dart:46:36)
E/flutter (17345): #4 _withClient (package:http/http.dart:166:20)
E/flutter (17345): <asynchronous suspension>
E/flutter (17345): #5 get (package:http/http.dart:46:5)
E/flutter (17345): #6 fetchData (package:datavisually_jobscan/main.dart:57:34)
E/flutter (17345): <asynchronous suspension>
E/flutter (17345): #7 main (package:datavisually_jobscan/main.dart:16:22)
E/flutter (17345): <asynchronous suspension>
E/flutter (17345): #8 _runMainZoned.<anonymous closure>.<anonymous closure> (dart:ui/hooks.dart:199:25)
E/flutter (17345): #9 _rootRun (dart:async/zone.dart:1124:13)
E/flutter (17345): #10 _CustomZone.run (dart:async/zone.dart:1021:19)
E/flutter (17345): #11 _runZoned (dart:async/zone.dart:1516:10)
E/flutter (17345): #12 runZoned (dart:async/zone.dart:1500:12)
E/flutter (17345): #13 _runMainZoned.<anonymous closure> (dart:ui/hooks.dart:190:5)
E/flutter (17345): #14 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:300:19)
E/flutter (17345): #15 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:171:12)
E/flutter (17345):
D/EGL_emulation(17345): eglMakeCurrent: 0xb6185540: ver 3 1 (tinfo 0xb61832d0)
D/EGL_emulation(17345): eglMakeCurrent: 0xb6185420: ver 3 1 (tinfo 0x9597c310)
Lost connection to device.

Filter

Back
Top Bottom