我是开发Android Studio项目的初学者。我已尝试过其他问题的所有解决方案,但这并没有解决我的问题。当我构建apk时,我收到此错误:
错误:无法从C:\ Users \ konstantinos \ AndroidStudioProjects \ WIFIConnectionListener-master \ src \ main \ AndroidManifest.xml
读取packageName
这是我的清单:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.wificonnectionlistener">
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application android:label="@string/app_name" >
<receiver
android:name=".WifiBroadCastReceiver"
android:exported="false" >
<intent-filter>
<action android:name="android.net.wifi.WIFI_STATE_CHANGED" />
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
<service android:name=".TextToSpeechService" >
</service>
</application>
</manifest>
这是我的built.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
}
}
allprojects {
repositories {
jcenter()
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 16
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.example.wificonnectionlistener"
minSdkVersion 7
targetSdkVersion 15
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}