admin管理员组文章数量:1391937
In this error ('package="io'), there has an operator " between ' and '.is it a system error? How do I solve it?
Error:
Namespace 'package="io.flutter.plugin.pathprovider"' is not a valid Java package name as 'package="io' is not a valid Java identifier
There is my relative file.
<manifest xmlns:android=";
package="io.flutter.plugin.pathprovider">
</manifest>
And this is build.gradle.
group "io.flutter.plugin.pathprovider"
version '2.0.11'
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
}
}
rootProject.allprojects {
repositories {
google()
mavenCentral()
}
}
apply plugin: 'com.android.library'
android {
compileSdk 35
defaultConfig {
minSdkVersion 16
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
disable 'InvalidPackage'
disable 'GradleDependency'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
testOptions {
unitTests.includeAndroidResources = true
unitTests.returnDefaultValues = true
unitTests.all {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
outputs.upToDateWhen {false}
showStandardStreams = true
}
}
}
buildToolsVersion '30.0.3'
}
dependencies {
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'com.google.guava:guava:28.1-android'
testImplementation 'junit:junit:4.13.2'
}
In this error ('package="io'), there has an operator " between ' and '.is it a system error? How do I solve it?
Error:
Namespace 'package="io.flutter.plugin.pathprovider"' is not a valid Java package name as 'package="io' is not a valid Java identifier
There is my relative file.
<manifest xmlns:android="http://schemas.android/apk/res/android"
package="io.flutter.plugin.pathprovider">
</manifest>
And this is build.gradle.
group "io.flutter.plugin.pathprovider"
version '2.0.11'
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
}
}
rootProject.allprojects {
repositories {
google()
mavenCentral()
}
}
apply plugin: 'com.android.library'
android {
compileSdk 35
defaultConfig {
minSdkVersion 16
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
disable 'InvalidPackage'
disable 'GradleDependency'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
testOptions {
unitTests.includeAndroidResources = true
unitTests.returnDefaultValues = true
unitTests.all {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
outputs.upToDateWhen {false}
showStandardStreams = true
}
}
}
buildToolsVersion '30.0.3'
}
dependencies {
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'com.google.guava:guava:28.1-android'
testImplementation 'junit:junit:4.13.2'
}
Share
Improve this question
edited Mar 13 at 16:40
Frank van Puffelen
601k85 gold badges890 silver badges860 bronze badges
asked Mar 13 at 15:12
IMULIMUL
11 bronze badge
1 Answer
Reset to default 0By the looks of it, the first two lines in your file should be:
group = "io.flutter.plugin.pathprovider"
version = '2.0.11'
本文标签: flutterHow can I resolve Java package namespace errorStack Overflow
版权声明:本文标题:flutter - How can I resolve Java package namespace error? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744694206a2620177.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论