|
Hello everybody:
I am new in flutter, using flutter version: 3.16.0 a Dart (SDK) 3.2.0
I had checked everything the manuals and forums say (also flutter), but I still have this error:
<pre>C:\Mapas\mapas\android\app\src\debug\AndroidManifest.xml Error:
uses-sdk:minSdkVersion 19 cannot be smaller than version 20 declared in library [:google_maps_flutter_android] C:\Mapas\mapas\build\google_maps_flutter_android\intermediates\merged_manifest\debug\AndroidManifest.xml as the library might be using APIs not available in 19
Suggestion: use a compatible library with a minSdk of at most 19,
or increase this project's minSdk version to at least 20,
or use tools:overrideLibrary="io.flutter.plugins.googlemaps" to force usage (may lead to runtime failures)
|
|
|
|
|
You should try the suggestions in the error messages.
|
|
|
|
|
If only everyone would RTFEM, there would be a lot fewer questions posted here.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
modified 4-Dec-23 9:45am.
|
|
|
|
|
Or just read the error messages ...
|
|
|
|
|
I had done everything flutter says and nothing at all.
android { │
│ defaultConfig { │
│ minSdkVersion 20 │
│ } │
│ }
Nothing happened
Suggestion: use a compatible library with a minSdk of at most 19,
or increase this project's minSdk version to at least 20,
or use tools:overrideLibrary="io.flutter.plugins.googlemaps" to force usage (may lead to runtime failures)
Nothing at all, the same error
|
|
|
|
|
The issue appears to be with the Google maps plugin, so the best place to ask for help woiuld be the Flutter web site.
|
|
|
|
|
|
Sigh...if only I could remember that myself when debugging problems on my own computer I would avoid quite few vexing problems also. I can even remember a few times I invited a co-worker to look over something and when I pointed out the error message, I finally read it, and then understood the problem.
|
|
|
|
|
It's an easy thing to do, but the trick is not to tell anyone.
|
|
|
|
|
I am currently working on setting up the backend for a project template I obtained from GitHub. The frontend setup is complete, however, I've hit a roadblock while integrating the backend, which has brought my progress to a standstill. The issue arises when attempting to connect the frontend with the data from a GraphQL query using Firebase's Realtime Database. Despite numerous attempts to resolve this problem, I have been unable to make any headway, and it's becoming increasingly frustrating.
The tech stack involved in this project includes React Native, GraphQL, and Firebase, as detailed in the repository: [https://github.com/Ninjas-Code-official/olx-app-clone-backend](https://github.com/Ninjas-Code-official/olx-app-clone-backend).
At this point, I am seeking someone with expertise in these technologies to provide assistance, and if possible, code along with me to resolve this issue. The importance of getting past this hurdle cannot be overstated as it is critical to the progress and eventual success of the project. The complexity and specificity of the problem require a level of understanding and experience that I currently lack, hence the need for external help.
I am more than willing to collaborate and learn in the process. This challenge has become a significant impediment, and any assistance to overcome it would be immensely valued. The goal is to not only resolve the current issue but to also foster a learning environment that will prevent similar challenges in the future.
I am highly motivated to get this project back on track and would greatly appreciate any help that can be provided. Your expertise and willingness to assist would mean a great deal and would significantly contribute towards moving the project forward.
|
|
|
|
|
What is the importance of incorporating AI into the development of mobile apps?
|
|
|
|
|
There are a lot of mobile ai in the market
|
|
|
|
|
|
Incorporating AI into mobile app development offers numerous advantages. By leveraging AI-powered features, developers can enhance user experience, streamline processes, and improve efficiency. AI enables predictive analytics, advanced security measures, and real-time insights, leading to smarter, more intuitive apps that meet users' evolving needs.
|
|
|
|
|
Which is the best model for developing a Food Delivery App?. Cloned app or a custom app, or an MVP?
|
|
|
|
|
The best model for developing a Food Delivery App depends on the goals and objectives of the app. A cloned app may be the fastest way to market, as it is created from pre-existing code that can be easily adapted to individual requirements. However, it will not include any unique features or branding, so this option should only be chosen if the quick turnaround time is a priority. Custom apps are tailored specifically to suit your needs and business objectives; however, they tend to require more development time and budget. An MVP (Minimum Viable Product) provides an initial version of the app without all the desired features, which can then be further developed over time based on customer feedback or revenue generated. Ultimately, choosing the best model will depend heavily on what your end goal is with regard to user satisfaction and monetization capabilities.
|
|
|
|
|
import 'package:flutter/material.dart';
import './practice2.dart';
import './practice3.dart';
void main()
{
runApp(MaterialApp(home:Akanksha()));
}
class Akanksha extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return AkankshaState();
}
}
class AkankshaState extends State<Akanksha>{
final questions=const[
{'questionText':'what is your favourite colour?','answers':['black','green','blue'],
},
{'questionText':'what is your fav drama?','answers':['black','green','blue'],
},
{'questionText':'what is your favourite animal?','answers':['black','green','blue'],
},
];
var _questionIndex=0;
void answerQuestion(){
setState((){
_questionIndex= _questionIndex+1;
});
print(_questionIndex);
if (_questionIndex<questions.length){print('We have more question!');}
else{print('no more questions!');}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar:AppBar(backgroundColor: Colors.deepOrange,
title:Text('my app')),
body:_questionIndex<questions.length ?
Column(
children: [
Question( questions[_questionIndex]['questionText'], ), ...
(
questions[_questionIndex]['answers'] as List).map((answer){
return Answer(answerQuestion , answer);
}).toList(),
],
): Center(child:Text('you did it!')),
);
}
}
import 'package:flutter/material.dart';
import './practice2.dart';
import './practice3.dart';
void main()
{
runApp(MaterialApp(home:Akanksha()));
}
class Akanksha extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return AkankshaState();
}
}
class AkankshaState extends State<Akanksha>{
final questions=const[
{'questionText':'what is your favourite colour?','answers':['black','green','blue'],
},
{'questionText':'what is your fav drama?','answers':['black','green','blue'],
},
{'questionText':'what is your favourite animal?','answers':['black','green','blue'],
},
];
var _questionIndex=0;
void answerQuestion(){
setState((){
_questionIndex= _questionIndex+1;
});
print(_questionIndex);
if (_questionIndex<questions.length){print('We have more question!');}
else{print('no more questions!');}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar:AppBar(backgroundColor: Colors.deepOrange,
title:Text('my app')),
body:_questionIndex<questions.length ?
Column(
children: [
Question( questions[_questionIndex]['questionText'], ), ...
(
questions[_questionIndex]['answers'] as List).map((answer){
return Answer(answerQuestion , answer);
}).toList(),
],
): Center(child:Text('you did it!')),
);
}
}
:wtf:
-----------------------------------------------
import 'package:flutter/material.dart';
class Question extends StatelessWidget {
String questionText;
Question(this.questionText);
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.all(20),
width: double.infinity,
child:Text(questionText,style:TextStyle(fontSize: 25),textAlign: TextAlign.center,)
);
}
}
------------------------------------------------------------------
import 'package:flutter/material.dart';
class Answer extends StatelessWidget {
final Function selectHandler;
final String answerText;
Answer(this.selectHandler, String this.answerText);
@override
Widget build(BuildContext context) {
return Container(
width:double.infinity,
child:ElevatedButton(
style: TextButton.styleFrom(backgroundColor: Colors.blueGrey,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10))),
onPressed: ()=> selectHandler(),
child:Text(answerText,style:TextStyle(color:Colors.white,fontSize:20))),
);
}
}
|
|
|
|
|
What error? Just dumping a load of code does not help us to discover what your problem is. Please edit your question and add full details of the problem.
|
|
|
|
|
In addition to what Richard said, when editing your post, please remove any unnecessary code. Just post what is relevant to the actual problem. All else is just noise.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Hello, I am new in XAMARIN, i have a simple APP in VS2022.
Here is part of the code:
public interface IRepository
{
[Get("/package/")]
Task<Resultado> GetAllData();
}
public class PaqueteServicio
{
public const string API_BASE_URL = "http://www.mi.traelopaq.net/listarpaqjson.php?text1=2264&text2=pOADSIQMASD.O398AJas&KEYAPI=ODUTRAS.9di23821@ldpli2skjs43&KEYPASo=OASmsjdu38IO1p29AA93JA0OD9K1221";
private IRepository repo;
public PaqueteServicio()
{
repo = RestService.For<IRepository>(API_BASE_URL);
}
public Task<Resultado> Get()
{
return repo.GetAllData();
}
}
Package.cs
public class Package
{
[JsonProperty("peso")]
public string Peso { get; set; }
[JsonProperty("tracking_number")]
public string TrackingNumber { get; set; }
[JsonProperty("contenido")]
public string Contenido { get; set; }
public class Resultado
{
[JsonProperty("results")]
public Package[] Results { get; set; }
}
Main:
class MainViewModel : BaseViewModel
{
private readonly PaqueteServicio paqueteServicio;
private List<Package> paqueteList;
public List<Package> PaqueteList
{
get => paqueteList;
set
{
paqueteList = value;
RaisePropertyChanged();
}
}
public ICommand ClickCommand => new Command(ClickCommandExecute);
private async void ClickCommandExecute()
{
var response= await paqueteServicio.Get();
PaqueteList = response.Results.ToList();
}
public MainViewModel()
{
paqueteServicio = new PaqueteServicio();
}
}
|
|
|
|
|
Very interesting but you forgot to ask a question. The message you see is telling you that you are trying to use a reference variable that does not have a value. This could be because you forgot to initialise it, or because some method call has not returned the reference that you expected. But either way the only way to find the offending code (and fix it) is to use the debugger and trace what your code is doing.
|
|
|
|
|
Thanks at lot,
Well, after debuggin i got this message, maybe this is really the PROBLEM:
I had read the possible solutions: But i do not get it. Sorry. Here is the code
As soon the App starts this method is executed:
public PaqueteServicio()
{
repo = RestService.For<IRepository>(API_BASE_URL);
}
and var repo get the URL value
When clicked the button: This is executed
public Task<Resultado> Get()
{
return repo.GetAllData();
}
Which it was defined here:
public interface IRepository
{
[Get("/")]
Task<Resultado> GetAllData();
}
Where Resultado is this (a class)
public class Resultado
{
[JsonProperty("results")]
public Package[] Results { get; set; }
}
And Package is my json file:
public class Package
{
[JsonProperty("peso")]
public string Peso { get; set; }
[JsonProperty("tracking_number")]
public string TrackingNumber { get; set; }
[JsonProperty("contenido")]
public string Contenido { get; set; }
}
|
|
|
|
|
Sorry, I do not know what that is supposed to mean. You need to trap the actual instruction that throws the exception.
|
|
|
|
|
Well, I just changed the code complete:
async void Button_Clicked(System.Object sender, System.EventArgs e)
{
var httpClient = new HttpClient();
var resultJson = await httpClient.GetStringAsync("http://www.mi.traelopaq.net/listarpaqjson.php?text1=2264&text2=pOADSIQMASD.O398AJas&KEYAPI=ODUTRAS.9di23821@ldpli2skjs43&KEYPASo=OASmsjdu38IO1p29AA93JA0OD9K1221");
var resultList = JsonConvert.DeserializeObject<Package[]>(resultJson);
PaqueteList.ItemsSource = resultList;
}
And Package is my json file:
public class Package
{
[JsonProperty("peso")]
public string Peso { get; set; }
[JsonProperty("tracking_number")]
public string TrackingNumber { get; set; }
[JsonProperty("contenido")]
public string Contenido { get; set; }
}
If you use postman and type the URL:
"http://www.mi.traelopaq.net/listarpaqjson.php?text1=2264&text2=pOADSIQMASD.O398AJas&KEYAPI=ODUTRAS.9di23821@ldpli2skjs43&KEYPASo=OASmsjdu38IO1p29AA93JA0OD9K1221"
You got an answer, but not in the programa, if it the same Error: Object Set without... and it is correct because there is not answer, But WHY? because it is works on postman.
|
|
|
|
|
I have explained why, and how to find the problem. I am afraid I cannot offer any more suggestions.
|
|
|
|
|